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

后端 未结 18 1855
鱼传尺愫
鱼传尺愫 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:26

    This happened to me on OSX where I use a case insensitive file system. Somehow another developer pushed a branch with the same name but different case: My-Branch vs my-branch.

    I already had My-Branch checked out and got the error "unable to update local ref" when I did a pull probably because the file system thinks My-Branch == my-branch.

    Since we use Github I could solve the problem by deleting one of the branches via Github's GUI.

提交回复
热议问题