How do I reset my local branch to be just like the branch on the remote repository?
I did:
git reset --hard HEAD
But when I run a <
All of the above suggests are right, but often to really reset your project, you also need to remove even files that are in your .gitignore.
To get the moral equivalent of erasing your project directory and re-cloning from the remote is:
git fetch
git reset --hard
git clean -x -d -f
Warning: git clean -x -d -f is irreversible and you may lose files and data (e.g. things you have ignored using .gitignore).