Git error on git pull (unable to update local ref)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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/project ! a0f80ea..49177a3 master -> origin/master (unable to update local ref) and when i do "git pull origin master" i get: error: Couldn't set ORIG_HEAD fatal: Cannot update the ref 'ORIG_HEAD'. i have been searching but cant find why 回答1: My team and I ran into this error, unable to update local ref , when doing a pull in SourceTree. We used : git gc --prune=now This removes any