我有这个
abc@abc-ubuntu:~/project1/wh-app-ios$ git branch -a -v -v
* master 1d35af1 [origin/master: ahead 2] Adding 123 to hello
remotes/gitb/gh-pages e3dad9d boom
remotes/gitb/integration 1d3fcd5 Adding 55_Glossary chapter
remotes/gitb/master 86d1d30 Merge remote-tracking branch 'origin/master'
remotes/gitb/pt_BR dc9d991 Revisions at 03, 07, 08, 09, 10, 11 and 50
remotes/origin/HEAD -> origin/master
remotes/origin/master 1ae426b Update README.md
我愿意
abc@abc-ubuntu:~/project1/wh-app-ios$ git checkout gitb/master
Note: checking out 'gitb/master'.
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 86d1d30... Merge remote-tracking branch 'origin/master'
然后看看我上面的警告信息
abc@abc-ubuntu:~/project1/wh-app-ios$ git checkout -b mastergitb
Switched to a new branch 'mastergitb'
现在我在
abc@abc-ubuntu:~/project1/wh-app-ios$ git branch -a -v -v
master 1d35af1 [origin/master: ahead 2] Adding 123 to hello
* mastergitb 86d1d30 Merge remote-tracking branch 'origin/master'
remotes/gitb/gh-pages e3dad9d boom
remotes/gitb/integration 1d3fcd5 Adding 55_Glossary chapter
remotes/gitb/master 86d1d30 Merge remote-tracking branch 'origin/master'
remotes/gitb/pt_BR dc9d991 Revisions at 03, 07, 08, 09, 10, 11 and 50
remotes/origin/HEAD -> origin/master
remotes/origin/master 1ae426b Update README.md
abc@abc-ubuntu:~/project1/wh-app-ios$
问题:
但显然 mastergitb 并没有跟踪 gitb/master。这是为什么 ?
我是否只是创建了一个名为 mastergitb 的本地分支,它只是 gitb/master 的副本,但与它没有其他关系?