[Git] How to Fix error: cannot lock ref 'refs/remotes/origin/xxx': 'refs/remotes/origin/xxx/yyy' exists;
I’ll introduce how to fix the Git error error: cannot lock ref ‘refs/remotes/origin/xxx’: ‘refs/remotes/origin/xxx/yyy’ exists;.
$ git fetch
error: cannot lock ref 'refs/remotes/origin/fix-test': 'refs/remotes/origin/fix-test/hoge' exists; cannot create 'refs/remotes/origin/fix-test'
! [new branch] fix-test/hoge -> origin/fix-test/hoge (unable to update local ref)
error: some local refs could not be updated; try running
'git remote prune origin' to remove any old, conflicting branches
git remote prune origin
That’s all from the Gemba.