Skip to content

Instantly share code, notes, and snippets.

@jpbeltrami
Last active August 30, 2020 23:44
Show Gist options
  • Save jpbeltrami/db38f9f1bb490715387ca97c50aa88d4 to your computer and use it in GitHub Desktop.
Save jpbeltrami/db38f9f1bb490715387ca97c50aa88d4 to your computer and use it in GitHub Desktop.
GIt tags cheatsheet

list tags

git tag

create tag

git tag tagname

delete remote tag

git push --delete origin tagname

delete local tag

git tag --delete tagname

push all tags

git push --tags
@Lunar2kPS
Copy link

Lunar2kPS commented Aug 30, 2020

This is super concise and helpful, thanks!!

Also, I needed to move a tag, which is:
git tag --force tagname commithash

I also needed to do the following to get its previous message back:
git tag --force tagname --message "the previous message goes here"

You might be able to combine these 2 commands to just move the tag with its message in 1 go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment