zl程序教程

您现在的位置是:首页 >  其他

当前栏目

VSCode拉取git分支报错:v1.1.0 (would clobber existing tag)的解决方法

2023-04-18 16:11:23 时间

今天在线上修改了 Tags ,再使用 VSCode 里的 pull 拉取分支时报错:

From http://git....
 * branch            dev        -> FETCH_HEAD
 ! [rejected]        v1.1.0     -> v1.1.0  (would clobber existing tag)

git 本地 tag 和远程 tag 对应不上就会出现这样的问题。

解决方法:

查看远程 tags :

git ls-remote -t

查看本地 tag :

git tag -l

删除本地 tag :

git tag -d xxx

拉取远程 tags :

git fetch origin --prune-tags

扩展:

删除远程 tags :

git push origin --delete tag xxx

未经允许不得转载:w3h5 » VSCode拉取git分支报错:v1.1.0 (would clobber existing tag)的解决方法