Git: How to overwrite local change?
If you want to save you changes first, you can commit them before and then checkout you code to previous commit(s):
git checkout HEAD^
(one commit back)
git checkout GEAD~2
(2 commits back)
Or, if you don't need your changes anymore, run git reset --hard HEAD
git checkout <name of file>
If you want to check out the whole repository, then from the root directory use
git checkout .
git reset --hard