Search code examples
gitgit-tag

Git tag another tag


How can I put a tag on same references of another tag? For example I would like to put tag "Stable_Build" on a tag of a certain release "1.0.0.1".

Is there a better\faster way to do it except to:

git checkout 1.0.0.1
git tag -a Stable_Build

Solution

  • go with git tag <new_tag> <old_tag> (see docs)

    $ git tag stable 1.0.0
    
    $ git tag --list
    1.0.0
    stable
    

    By the way: it would not refer to tag 1.0.0 but to same commit as tag 1.0.0.