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
I had this same error and closing the app which had the file open solved it. I was able to go back and press "Y"
On Windows, saw this error on a git clone
of a (fairly large) repo. Closed SmartGit and paused my backup software (CrashPlan), and after that it worked. Not sure which of the 2 did the trick, but if running either, this might do it for you too.
I ran into this issue in Windows, you might want to run the git bash as an administrator and then perform the desire commands, that solved the issue for me.
this solution from here worked for me:
This is a Windows specific answer, so I'm aware that it's not relevant to you... I'm just including it for the benefit of future searchers.
In my case, it was because I was running Git from a non-elevated command line. "Run as Administrator" fixed it for me.
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
I got this problem in Windows. I closed my IDE (Android Studio) and selected YES in git shell. It worked.