Thursday, September 30, 2021

Git - tagging

Lightweight tags: 

function gitgraph {git log --oneline --graph --decorate --all}

git tag v1.0.0
gitgraph
git tag v0.9.1 <previous commit>
gitgraph
git tag --list

you can look for this tag:
git show v1.0.0

Annotated tags: 

Those enable you to add messages and creating an object that references commit

git tag -a v0.0.1 <commit hash> -m "First version"

git show v0.0.1
#we see the TAG information AND then the commit it references
git cat-file -t v0.0.1
git cat-file -t v1.0.0

No comments:

Post a Comment