Something wrong is going on with one of the files in my local git repository. When I\'m trying to change the branch it says:
Unlink of file \'templates/media
This might be useful for someone; if all the above didn't work for you, follow these steps:
Close your IDE (mine was Eclipse, not sure if it applies to Intellij and others) or any other app that might be using git.
Open git from the command line (in my case I had git bash) and run git gc as mentioned by others.
This did the magic for me.