tags

Git Tag Mini Cheat Sheet Revisited

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 In the previous cheat sheet only the lightweight local tags were discussed. A lightweight tag is nothing more than a reference to a particular revision or SHA1 object name in the repository.

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.