Posts Tagged ‘cheat sheet’

Git Tag Mini Cheat Sheet Revisited

September 5th, 2009

Just as a kind of mini cheat sheet for using git tags. Jörg Mittag had some great additions that weren’t in the original post which warrant a new post.

Git has three different type of tags:

  • Lightweight tags
  • Annotated tags
  • Signed tags

Let’s start with lightweight tags.

Lightweight tags

Git Tag Mini Cheat Sheet

September 4th, 2009

Just as a kind of mini cheat sheet for using git tags:

Adding a tag:

  • git tag tag_name
  • git tag
    Should show your new tag.
  • git push origin --tags or git push origin :tag_name
    Because git push doesn’t push tags.

Removing a tag:

  • git tag -d tag_name
  • git tag
    Should no longer show your tag.
  • git push origin :refs/tags/tag_name
    Because git push --tags doesn’t push deleted tags.