git-rename-tag - Man Page

Rename a tag

Examples (TL;DR)

Synopsis

git-rename-tag <old-tag-name> <new-tag-name>

Description

Rename a tag (locally and remotely)

Options

<old-tag-name>

The name of the tag you want to rename.

<new-tag-name>

The new name of the tag.

Examples

$ git tag test
$ git push --tags
Total 0 (delta 0), reused 0 (delta 0)
To git@myserver.com:myuser/myrepository.git
 * [new tag]         test -> test
$ git tag
test
$ git rename-tag test test2
Deleted tag ´test´ (was 1111111)
Total 0 (delta 0), reused 0 (delta 0)
To git@myserver.com:myuser/myrepository.git
 * [new tag]         test2 -> test2
remote: warning: Deleting a non-existent ref.
To git@myserver.com:myuser/myrepository.git
 - [deleted]         refs/tag/test
$ git tag
test2

Author

Written by Jesús Espino <jespinog@gmail.com>

Reporting Bugs

<https://github.com/tj/git-extras/issues>

See Also

<https://github.com/tj/git-extras>

Referenced By

git-extras(1).

October 2017 Git Extras