git command to discard changes code example
Example 1: git discard unstaged files
git stash save --keep-index --include-untracked
Example 2: revert unstaged changes git
git checkout -- .
git stash save --keep-index --include-untracked
git checkout -- .