看來你是(你是因爲你說這是正常的新GIT)如何git的作品有點誤會
每個分支並不一定能獲得它自己的線。如果您的分支Sprint_15
的基數爲master
而Sprint_15
爲master
之前的任意數量的提交,則它們將共享相同的行。只要master
得到一個新的提交,那麼我認爲你會看到你的期望。
你可以像這樣在一個單獨的git倉庫中測試它。
$ mkdir testing && cd testing
$ git init # should put you on master branch by default
$ touch testFile.txt
$ git add -A
$ git commit -m "initial commit"
$ git branch newBranch
$ git checkout newBranch # switch from master to newBranch
### modify the testFile.txt in some way and then...
$ git add -A
$ git commit -m "first commit on newBranch"
現在,如果你使用相同的工具來看看你的回購,你應該看到的只是一條線,像這樣: ![same line](https://i.stack.imgur.com/BYKYI.png)
現在回到主分支和再拍承諾:
$ git checkout master
### make another change to testFile.txt
$ git add -A
$ git commit -m "second commit on master"
現在你會看到有每個分支它自己的線像你期待的,是這樣的:![enter image description here](https://i.stack.imgur.com/bLjTY.png)
這似乎升請給出正確的答案,謝謝你的解釋! –