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

后端 未结 18 1756
鱼传尺愫
鱼传尺愫 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 11:59

    Try to use this command in your git repository root folder:

    rm .git/logs/refs/remotes/origin/master 
    
    0 讨论(0)
  • 2020-12-12 11:59

    Clone the repository again, and copy the .git folder in your broken project.

    0 讨论(0)
  • 2020-12-12 12:02

    This error with (unable to update local ref) can also happen if you have changed passwords recently and there's some fancy stuff integrating your Windows and Linux logins.

    0 讨论(0)
  • 2020-12-12 12:05

    I had the same issue on my debian server as the disk is full. No temp file could be created as no space left on device. After cleaning some files, it worked out fine.

    0 讨论(0)
  • 2020-12-12 12:06

    Ensure the user that is executing the git pull is the same user that created the repository. The file permissions are incorrect.

    0 讨论(0)
  • 2020-12-12 12:08

    Remove file .git/logs/refs/remotes/origin/[Locked Branch Name]

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