error: cannot lock ref 'refs/remotes/origin/master': unable to resolve reference 'refs/remotes/origin/master': reference broken code example
Example 1: git unable to update local ref
git gc --prune=now
git remote prune origin
rm .git/refs/remotes/origin/master
git fetch
git pull origin master
Example 2: git error: cannot lock ref 'refs/remotes/origin/master': unable to resolve reference 'refs/remotes/origin/master': reference broken
rm .git/refs/remotes/origin/master
git fetch