git revert - how to abandon changes in your current branch

Simple way to abandon changes you've made, and revert your tree to the "clean" state of your current branch. Don't use 'git revert', as you might think. Use this command instead:

$ git reset --hard HEAD

Forums: