Skip to content

Instantly share code, notes, and snippets.

@stevenyap
Created February 21, 2014 08:45
Show Gist options
  • Select an option

  • Save stevenyap/9130816 to your computer and use it in GitHub Desktop.

Select an option

Save stevenyap/9130816 to your computer and use it in GitHub Desktop.
Git Tagging

Git Tagging

  • Git tagging is like a mark where you mark a specific commit so that you can track how many commits ahead you are from that mark (tag)
  • A tag can only mark a commit, not multiple commits
# commit something first

# tag a commit (will tag last commit)
git tag -a v1.0 -m 'An intelligent message'

# tag a specific commit (eg. 8b6741d)
git tag -a v1.0 -m 'An intelligent message' 8b6741d

# to see all the tags you have
git tag -l 'v1.*'

# to see the tagged commit
git show v1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment