Git Tag Push

Linux 2022-08-17 101

New

  • New a tag with current HEAD [1]
git tag -a 'tag_name'
git tag -a v1.0.0
  • New a tag with specific commit
git tag -a 'tag_name' commit_SHA
git tag -a v1.0.0 fc30d37b

Edit Exists Tag#

git tag <tag_name> <tag_name>^{} -f -a

Push

git push origin 'tag_name'
git push origin v1.0.0
  • Push all local tag to remote
git push origin --tags

Overwrite Exists Tag#

git push origin --tags -f

Show

  • List
git tag
  • Check tag note and commits
git show 'tag_name'
git show v1.0.0