Git discard all changes - How to undo all working dir changes including new files?
How to delete all changes from the working directory including new untracked files. I know that git checkout -f does that, but it doesn't delete new untracked files created since the last commit.
Does anybody have an idea how to do that?
Simple way to solve git discard all changes is:
Step 1: Revert modified files using the following command:
$ git checkout -f
Step 2: Remove untracked files:
$ git clean -fd