# Check your remote sources:git remote -v# The argument (3rd) is your remote location,# the one you can see with `git remote`. In this example: `origin`git push origin :refs/tags/old
command: git tag -d <tag name>example: git tag -d v0.1.0-Demoexample output: Deleted tag 'v0.1.0-Demo' (was abcde)
第3步:创建一个新标记,指向与旧标记指向的相同的提交ID
command: git tag -a <tag name> -m "appropriate message" <commit id>example: git tag -a v0.1.0-full -m "renamed from v0.1.0-Demo" db57b63b77a6bae3e725cbb9025d65fa1eabcdeexample output: Nothing or basically <No error>
一旦本地git准备好更改标签名称,这些更改就可以被推回到原点,让其他人接受这些更改:
command: git push origin :<old tag name> <new tag name>example: git push origin :v0.1.0-Demo v0.1.0-fullexample output: <deleted & new tags>
Tag commit: 88a6169Tagger date: Mon Dec 14 12:44:52 2020 -0600Tagger name: John DoeTagger email: <j.doe@example.com>Tagged commit: cda5b4dTag name: oldTag message: Initial tag
Body line 1.Body line 2.Body line 3.
GIT_COMMITTER_NAME="John Doe" GIT_COMMITTER_EMAIL="j.doe@example.com" \GIT_COMMITTER_DATE="Mon Dec 14 12:44:52 2020 -0600" git tag new cda5b4d -a -m "Initial tag
Body line 1.Body line 2.Body line 3."
Tag commit: 580f817Tagger date: Mon Dec 14 12:44:52 2020 -0600Tagger name: John DoeTagger email: <j.doe@example.com>Tagged commit: cda5b4dTag name: newTag message: Initial tag
Body line 1.Body line 2.Body line 3.
Tag commit: 30ddd25Tagger date: Mon Dec 14 12:44:52 2020 -0600Tagger name: John DoeTagger email: <j.doe@example.com>Tagged commit: cda5b4dTag name: oldTag message: Initial tag
Body line 1.Body line 2.Body line 3.