I\'m trying to do a git pull and I get the following error:
Unlink of file \'lib/xxx.jar\' failed. Should I try again? (y/n)
No
Try running command line editor in administrative mode and run command. It helps and solves problem. :)
Try to restart you Apache or other web server as it may have locked some of your files.
None of the above answers ain't work for me, but I run git gc command with force option, and it solved my case.
'git gc --force'
[Windows 7, Run As Administrator => Command Prompt]
I've got this problem too, but I found out it was the UltraEdit in the way, since I used UE to organize and edit my eclipse workspace~~
Maybe because the UE has a handle on the old version of specific file, Git could not unlink of it.
After I closed UltraEdit, the problem never happened again.
I had PHPStorm open, closed that and all was well.
I faced the same error and resolved it by closing the eclipse and pulling again as the file was being used.