Skip to content

Instantly share code, notes, and snippets.

@naskio
Created December 2, 2022 06:56
Show Gist options
  • Select an option

  • Save naskio/8250742e78df94ce28ad7ebc5c4048ad to your computer and use it in GitHub Desktop.

Select an option

Save naskio/8250742e78df94ce28ad7ebc5c4048ad to your computer and use it in GitHub Desktop.
Git - Tagging, Create local tag, create remote tag, delete local tag, delete remote tag.

Git - Tagging

Create tag locally

git tag <tag_name>
# or with a message
git tag -a <tag_name> -m "<message>"
# examples
git tag v0.1
git tag -a v0.1 -m "first version"
# list local tags
git tag

Push tag to remote

# push all local tags
git push --tags
# push only one tag
git push origin <tag_name>
# example
git push origin v0.1

Delete tag locally

git tag -d <tag_name>

Delete remote tag

git push --delete origin <tag_name>
# example
git push --delete origin v0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment