私はこれを持っています
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 のコピーですが、他の関係はありません。