layris3 / Daily-learning-experience-record

daily learning experience
0 stars 0 forks source link

git-git tag #13

Open layris3 opened 4 years ago

layris3 commented 4 years ago

there are 2 types of tags in git: 1 lightweight tag:this is the simple way that only provide the information of tag-name. example: git tag <tagname>

2 annotation tag:this way shows more information like author,date...etc example:git tag -a <tagname> -m <message>

set a tag to specific commit: use 2 commands above and add the specific commit SHA-1 number. for example:git tag <tagname> 9f824bc8ff

delete the tag git tag -d <tagname>

push your local tag to remote repository git push origin <tagname>

or you wanna push all the tags,you can use the command below:

git push origin --tags

layris3 commented 4 years ago

search the specific commit by tag git show <tagname>

show all the tags git tag