当从远程仓库拉取代码时:git pull

报错如下:

error: cannot lock ref 'refs/remotes/origin/innertag': is at 0440433ebbca6fc0a3dc041946346d004ae1d7ee but expected 98150e1dcad8640daa66b5499d6e234d71806a6e
From code.xxx.com:xchannel/xc-centre
 ! 98150e1d..7a2c45c5  innertag   -> origin/innertag  (unable to update local ref)
Please make sure you have the correct access rights
and the repository exists.

解决方法:

1,执行命令: git gc --prune=now

2,再执行:git remote prune origin

git gc --prune=now 

git remote prune origin

最后 git pull 即可正常执行
 

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐