Dogbert Dogbert - 8 months ago 47
Git Question

Reset all changes after last commit in git

How can I undo every change made to my directory after the last commit, including deleting added files, resetting modified files, and adding back deleted files?


First reset the changes

git reset HEAD --hard

then clean out everything untracked

git clean -fd