如何将标签消息编辑推向原点



我在将我要纠正的来源的标签消息上犯了拼写错误,但是我正在努力工作。

我使用此页面成功地在我的本地分支上编辑了注释的标签消息:如何在git中编辑现有标签消息?

git tag <tag name> <tag name>^{} -f -m "<new message>"

这在本地纠正了标签,但我无法将标签推到遥控器上:

git push origin <tag name> 

给了我一个错误

! [rejected]        v1.7 -> v1.7 (already exists)
error: failed to push some refs to 'git@gitlab.com:tompkins/vectri.git'
hint: Updates were rejected because the tag already exists in the remote.

因此,我试图简单地删除标签并重新开始。我在本地删除了它并重新创建了它,但是当我尝试使用此页面时,如何删除远程标签?要远程删除它:

git push --delete origin tagname

我收到错误:

remote: GitLab: You cannot delete a tag

可以编辑远程标签消息吗?

我认为您必须做:

git push origin -f <tag-name>

最新更新