Git uses two main types of tags: lightweight and annotated.
Annotated Tags:
$ git tag -a v2.1.0 -m "message"
Lightweight Tags:
$ git tag v2.1.0
git log --oneline
#use SHA-1 while creating a tag, for example
git tag -a v1.1 e436353
git show v1.1
git push --tags
#verify created tags
Github⇒Repo⇒Branch⇒Tags
Add/change some file then commit and create a new tag v1.2 by repeating the above steps
Tags and branches are completely unrelated
tag create a bundle of .zip and tar.gz of branch
It won't be in sync with each branch in the remote.
#delete a tag
git tag --list
git tag -d v1.1
#delete a tag from remote
git push origin --delete v1.1
#copy tag as a branch
git checkout -b new_branch v1.2
No comments:
Post a Comment