git
- 错误 01:
git pull
error: cannot lock ref 'refs/remotes/origin/bugfix/remove_unused_log': 'refs/remotes/origin/bugfix' exists; cannot create 'refs/remotes/origin/bugfix/remove_unused_log'
From [gitlab.xxxx.com](http://gitlab.xxxx.com/):backend/live-campaign
! [new branch] bugfix/remove_unused_log -> origin/bugfix/remove_unused_log (unable to update local ref)
87b5ad5c..4afbf8fe testing/1228 -> origin/testing/1228
删掉远程分支 testing/1228
, 本地执行 git fetch --prune
- 错误 02:
go get xxxx
go: [gitlab.xxxxx.com/backend/live-medal/_proto@v1.0.51-0.20210616102043-111161cafa36:](http://gitlab.xxxxx.com/backend/live-medal/_proto@v1.0.51-0.20210616102043-111161cafa36:) invalid pseudo-version: git fetch -f [https://gitlab.xxxxx.com/backend/live-medal.git](https://gitlab.xxxxx.com/backend/live-medal.git) refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /Users/lixingliang/go/pkg/mod/cache/vcs/2c2ff527fe76e1bac601f29f1308f5a6d70182f2daee5d408b90e6d0de343a2e: exit status 1:
From [gitlab.p1staff.com](http://gitlab.xxxxx.com/):backend/live-medal
* [new branch] bugfix/hier -> bugfix/hier
* [new branch] bugfix/remove -> bugfix/remove
error: cannot lock ref 'refs/heads/testing/210608': 'refs/heads/testing' exists; cannot create 'refs/heads/testing/210608'
! [new branch] testing/210608 -> testing/210608 (unable to update local ref)
error: some local refs could not be updated; try running
'git remote prune [https://gitlab.xxxxx.com/backend/live-medal.git](https://gitlab.xxxxx.com/backend/live-medal.git)' to remove any old, conflicting branches
解决: rm -rf $GOPATH/pkg/mod/gitlab.xxxxx.com/backend/live-medal
, 然后重新 go get ./...
再不行: rm -rf $GOPATH/pkg/mod/cache/vcs/
, 然后重新 执行 go get ./...