git 使用过程中,长时间没有更新了,git pull 出现如下问题:
error: cannot lock ref 'refs/remotes/origin/test/xx': 'refs/remotes/origin/test' exists; cannot create 'refs/remotes/origin/test/xx'
原因是远程分支已经删除了,本地仍然存在记录,刷新本地仓库即可。
git remote prune origin
git 使用过程中,长时间没有更新了,git pull 出现如下问题:
error: cannot lock ref 'refs/remotes/origin/test/xx': 'refs/remotes/origin/test' exists; cannot create 'refs/remotes/origin/test/xx'
原因是远程分支已经删除了,本地仍然存在记录,刷新本地仓库即可。
git remote prune origin