Git error on git pull (unable to update local ref)

后端 未结 18 1856
鱼传尺愫
鱼传尺愫 2020-12-12 11:25

I only have branch master and im getting this error every time i try to \"git pull\":

error: Couldn\'t set refs/remotes/origin/master
From /var/lib/git/xxx/p         


        
18条回答
  •  独厮守ぢ
    2020-12-12 12:21

    I had the same error, I was updating from within Eclipse and I got many errors. So I tried updating from a DOS command window, and got the same issue.

    Then I tried the solution " git gc --prune=now " This gave messages that the files were locked in the refs directory.

    Eclipse must have had a locked on something in the "refs" directory.
    The solution I found was to simply close Eclipse. Then I updated the repository from DOS with a " git PULL " command, and everything worked fine.

提交回复
热议问题