Dev Notes

Various Cheat Sheets and Resources by David Egan/Carawebs.

Reset Project to the Last Git Commit


Git
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

References


comments powered by Disqus