Git checkout discard changes => http://delibobbpun.nnmcloud.ru/d?s=YToyOntzOjc6InJlZmVyZXIiO3M6MjE6Imh0dHA6Ly9iaXRiaW4uaXQyX2RsLyI7czozOiJrZXkiO3M6Mjg6IkdpdCBjaGVja291dCBkaXNjYXJkIGNoYW5nZXMiO30= Since this has the potential to overwrite local changes, Git forces you to commit or any changes in the working directory that will be lost during the checkout operation. It can be easily fixed before you do a git push. Stashing Some answers mention stashing. This is what happened to me. After that I moved all projects to the new volume. When you're discarding changes to a modified file, make absolutely sure you're not discarding changes that you actually wanted to keep! We decided that was a bad idea, so we unstaged the change. If you really care about your stash stack then you can follow with git stash drop. A revert is an operation that takes a specified commit and creates a new commit which inverses the specified commit. It wouldn't work or it would just tell me that I do not have permission. Similar to some other answer here, but this one also removes all unstaged files and also all unstaged deletes: git add. Git forces you to commit or any changes in the working directory that will be lost during the checkout. Reset changes the index to match a commit. Note that this removes all of the subsequent changes to the file, whereas the git revert command undoes only the changes introduced by the specified commit. This will discard commits in a private branch or throw away uncommitted changes! For example, the following command will figure out the changes contained in the 2nd to last commit, create a new commit undoing those changes, and tack the new commit onto the existing project. The take away here is that git reset changes the index to match a commit. I have also added more frequently used git commands that helps me on git, to help someone else too. How to force Git to overwrite local files on pull - Checkout old commits The git checkout command is used to update the state of the repository to a specific point in the projects history. The checkout doesn't git checkout discard changes to be working. Am I doing something wrong. On windows, I've seen issues with line-endings causing issues like this. In that case, look at what settings you have for git config core. I would say, if you are using git svn for integration with subversion, then do make sure autocrlf is turned off. From what I can tell it is just broken in this configuration and it makes most of the tools think files have been changed, when you have done a checkout to revert any changes. If you are seeing a problem git checkout discard changes you do git checkout, and then git status shows the file is still modified, and git diff shows the file is modified on every line in the file, then this is the problem you are seeing. Git will verify if a command modifies a file in the work tree either directly or indirectly. For example, committing a file followed by checking out the same file should yield the original file in the work tree. If this is not the case for the current setting of core. This has been bothering me for a while, almost every repo I'd check out had changes that I couldn't discard. Long story short, I tried all of the above, nothing worked. This is what happened to me. On my version of git you can discover this by using git diff index. It still won't let you revert them, though, using checkout, even with the -f option. For that use either git config core. This is used to throw away local changes. For instance, discard changes on the current branch and switch to a different branch: git checkout -f master I had this issue and after trying all of the above, nothing worked. What worked git checkout discard changes me was to delete the directory that the file was in, then did git status and made sure that all the files in that dir are now marked as deleted. After that I simply did git checkout -f and everything was back to normal. I've had a similar issue, where it wouldn't allow me to discard files which either does not exist or has been changed. I use Visual Studio at work, and I found that this happens when switching branches while the app is running. It wouldn't work or it would just tell me that I do not have permission. There is a easy solution. If this happens normally from unexpected windows shutdown or memory dump and you cannot discard your changes and even switch between branches Git says you don't have enough permission ; in Windows environment show all hidden files and folders from folder options. Then Git should let you do whatever you want to do. In my case I could not discard changes related to a directory. And then I just ran a git checkout master in there. That set things right for me. But this is not helpful for the exact scenario asked in here. This is an old question, but was still relevant to me. I did not find my answer until asking around the office, and discovered that the problem was with submodules. When they are updated, and your own repository does not reflect those changes, it shows up as having differences, reseting the head doesn't help. If this is the case, run: git status update That should help fix things in this particular case.