Tag

2 types

  1. light weight tags

  2. annonated tags

Check tag type

git cat-file -t <tag-name>
// Ex
git cat-file -t v1.0.0-rc1
// tag <- annotated tag
// commit <- light weight tag

Tagging idea

v1.0.0-rc1
v1.0.0-rc2
v1.0.0-rc3
v1.0.0-alpha
v1.0.0-beta
v1.0.0
git tag v1.0.0-rc1  // will be associated with recent commit
// annotated tag - have Tagger:... info
git tag -a v1.0.0-rc1 -m "I am tag with more detail" (-a -> annotated)
git tag // list tags
git tag -l "v1.0.0*" // search tags

// see particular tag
git show v1.0.0-rc1

Compare Tag

Update Tag

Moving tag to different commit ( may be recent commit )

Remove Tag

Pushing Tag to github

Config to push annotated tag by default ( with commit - git push origin master)

Checkout Tag

You need to create a branch to acheive this

Last updated

Was this helpful?