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
As i am using gitkraken and command prompt, i ran into the same issue. And then i run git gc command it resolved my problem. So i am happy and want share some of the points which might be helpful.
What git gc will do ?
git gc removing unreachable objects which may have been created from prior invocations of git add.
When to run git gc?
From doc, users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance.
How to make it auto-configurable?
Some git commands may automatically run git gc; see the --auto flag below for details. If you know what you’re doing and all you want is to disable this behavior permanently without further considerations, just do
git config --global gc.auto 0