Error: Git Pull Fails “Unable To Resolve Reference” “Unable To Update Local Ref”

789    Asked by AndreaBailey in SQL Server , Asked on Nov 18, 2022

When I run a simple git pull command, I get this error: unable to resolve reference refs/remotes

Answered by Andrea Bailey

My team and I ran into this error, unable to update local ref, when doing a pull in SourceTree.


Update 2020: Per @Edward Yang's answer below, @bryan's comment on this answer, and this question/answer you may need to run both git gc --prune=now and git remote prune origin. Running only the former has always worked for me but based on ppl's responses I think both are necessary to address different causes of the error.
We used:
git gc --prune=now

This removes any duplicate reference objects which should fix the issue.



Your Answer

Interviews

Parent Categories