Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[Git] Create & delete tag (both local and remote)

You can find me by #iOSBySheldon on Github, Facebook, Youtube, etc.

Often used git tag operations

To create and push a tag

Assuming the tag name that we want to create is abc

# to create tag locally
$ git tag abc
# to push to remote
$ git push orgin abc

To delete and push to remove a tag for remote

Assuming the tag name that we want to create is abc

# to delete tag locally
$ git tag -d abc
# to delete on remote
$ git push orgin :refs/tags/abc

To check all current tags

Assuming the tag name that we want to search contains abc

$ git tag | grep "abc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment