Dev Notes

Software Development Resources by David Egan.

Reset Project to the Last Git Commit

David Egan

When you’ve made a mess of your code and you need to reset your project to the last git commit.

Reset changes and remove untracked files from the working tree:

cd /path/to/project
git reset HEAD --hard
git clean -fd


comments powered by Disqus