Git along with practical guidance ---- haibiscuit learn Git (Title VII)

Pseudonym: haibiscuit

Park blog: https://www.cnblogs.com/haibiscuit/

Git address: https://github.com/haibiscuit?tab=repositories   (welcome star)

The project Address: https://github.com/haibiscuit/StudyBook

I respect the fruits of labor, please do not reprint without permission

 

: git tag

(1)  Check the label

git tag

(2)  show the current nearest branch tag

git describe --tags --abbrev=0

(3)  View tag details

git show <version-number>    //<version-number>tag_name

(4)  local label created

git tag <version-number>

The default tag is playing in a recent commit on, if you need to specify commit to play tag:

$ Git tag -a <version-number> -m "v1.0 release (description)" <commit-id>

(5)  push the tab to a remote repository

First, to ensure locally created label tag can push to a remote repository:

git push origin <local-version-number>

A one-time push all the labels, synchronized to a remote repository:

git push origin --tags

(6)  Delete the local label

git tag -d <tag-name>

(7)  remove the remote tag

Delete remote local labels need to remove the label, and then execute the following command:

git push origin :refs/tags/<tag-name>

(8)  to switch back to a tab

Before the general on-line will play tag, it is to prevent problems on the line, quickly and easily roll back to the previous version. The following command is returned to the state at a certain label:

git checkout -b branch_name tag_name

Guess you like

Origin www.cnblogs.com/haibiscuit/p/11986422.html