Skip to content

Instantly share code, notes, and snippets.

@anistark
Created July 30, 2017 18:23
Show Gist options
  • Save anistark/160132d27ff47f45a23cd7314fe800b3 to your computer and use it in GitHub Desktop.
Save anistark/160132d27ff47f45a23cd7314fe800b3 to your computer and use it in GitHub Desktop.
Git Tagging

Git Tagging

Annotated Tags

git tag -a v1.4 -m 'my version 1.4'

Lightweight Tags git tag v1.4-lw Tagging Later

For tagging later, we need to first view which commit we want to tag to: git log --pretty=oneline Once we've located the exact commit. We can use the commit id to tag to it as shown below: git tag -a v1.2 <commit_id first few digits to uniquely identify> Now, you would wanna push particular tags to git: git push origin v1.5 If you wanna push all the tags to git: git push origin --tags To view all the tags: git tag

git tag -d 12345 git push origin :refs/tags/12345

git tag 0.0.2

git push origin master —tags

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