我的本地分支someNewFeature
錯誤分歧。Git按順序合併發散分支
運行git狀態,表明這一點:
$ git status
On branch someNewFeature
Your branch and 'origin/someNewFeature' have diverged,
and have 8 and 1 different commit each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working directory clean
的git的承諾樹爲當地的分支機構是這樣的:
* jjjjjjj commit 10
* iiiiiii commit 9
* hhhhhhh commit 8
* ggggggg commit 7
* fffffff commit 6
* eeeeeee commit 5
* ddddddd commit 4
* ccccccc commit 3
| * bbbbbbb Diverged commit
|/
* aaaaaaa Base commit
我想通過應用所有提交順序,以解決分歧,即它應該看起來像這樣:
* jjjjjjj commit 10
* iiiiiii commit 9
* hhhhhhh commit 8
* ggggggg commit 7
* fffffff commit 6
* eeeeeee commit 5
* ddddddd commit 4
* ccccccc commit 3
* bbbbbbb Diverged commit
* aaaaaaa Base commit
Bo nus:如果你能猜到我可能怎麼做到這一點,我會很感激你的洞察力。
你確定提交通過引用'bbbbbbb'採用的是按時間排序的所有其他提交過嗎? – Makoto
是的,我是。我今天早上做了這項工作。 – Morgoth
在你做了一些修改(提交'dddd..jjjj')到你本地的'someNewFeature'分支之後,'cccc'是一個由'git pull origin/someNewFeature'產生的合併提交嗎? –