Unlink of file failed

前端 未结 17 1207
时光取名叫无心
时光取名叫无心 2020-12-07 12:06

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

相关标签:
17条回答
  • 2020-12-07 12:16

    The problem is because you're having some program that handling these files. I have an suggestion that you should use the Unlocker to find the program that's handling it:

    Unlocker

    0 讨论(0)
  • 2020-12-07 12:17

    Closed Visual Studio and Rubymine and didn't get the error again. One of them was the culprit.

    0 讨论(0)
  • 2020-12-07 12:18

    For me, it was because Visual Studio was trying to reload all of the changed files from the pull. Have visual studio refresh, then run git gc.

    0 讨论(0)
  • 2020-12-07 12:21

    I have had this happen on Windows XP, both with the message stuck in a loop, and being able to be cleared by replying.

    The stuck-in-a-loop occurence was cleared by closing the Git-GUI. (I was running git merge -i in a bash shell.)

    The other occurences happened possibly due to the large number of files in my repository. It happened mainly with .cod files, which I later exclude from version control. (I do have a reason for intially tracking them.) I believe the cause might be related to the rate at which Git uses file handles.

    I wonder if the able-to-be-cleared-by-replying problem is Windows related, as two previous posters have mentioned Windows, and no one has said they have the problem with other operating systems.

    0 讨论(0)
  • 2020-12-07 12:21

    In my case I had an old method of pruning tags causing the issue. I solved it by unsetting the original:

    git config --global --unset remote.origin.fetch '\+refs/tags/\*:refs/tags/\*'
    

    then adding this to prune deleted branches on the server:

    git config --global fetch.pruneTags true
    
    0 讨论(0)
  • 2020-12-07 12:23

    Close your IDE then do git pull . It will work.

    0 讨论(0)
提交回复
热议问题