how to discard all unstaged changes in git code example
Example 1: git discard unstaged files
git stash save --keep-index --include-untracked
Example 2: git delete changes
git clean -df
git checkout -- .
git stash save --keep-index --include-untracked
git clean -df
git checkout -- .