discard change github code example
Example 1: git discard unstaged files
git stash save --keep-index --include-untracked
Example 2: git remove my local changes and pull from master
git reset --hard <your commit hash key>
git stash save --keep-index --include-untracked
git reset --hard <your commit hash key>