Skip to content

Instantly share code, notes, and snippets.

@SheldonWangRJT
Created October 15, 2019 00:58
Show Gist options
  • Save SheldonWangRJT/b16a28726cd353fd4df730432a740294 to your computer and use it in GitHub Desktop.
Save SheldonWangRJT/b16a28726cd353fd4df730432a740294 to your computer and use it in GitHub Desktop.
[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