Git study Day02 標籤

陳重陽發表於2017-01-14

1.標籤

新增標籤

$ git tag v1.0
$ git tab
v1.0

獲取v1.0版本程式碼

$ git checkout tags/v1.0

Note: checking out 'tags/v1.0'.

 You are in 'detached HEAD' state. You can look around, make experimental
 changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at fc8fc32... one

新建分支,修復v1.0版本bug

$ git checkout -b fixbug

合併bug分支

$ git merge fixbug
$ git branch -d fixbug

相關文章