devroom.io/content/posts/2009-09-04-git-tag-mini-cheat-sheet.md
2019-06-05 14:32:16 +02:00

794 B

+++ date = "2009-09-04" title = "Git Tag Mini Cheat Sheet" tags = ["git", "cheat sheet", "tags"] slug = "git-tag-mini-cheat-sheet" +++

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.
Hope that helps.