[Git] 使用rebase整理merge commits

註解 2020-05-27 112920

使用指令:

git rebase -i 61d3628 -r
註解 2020-05-27 113038

onto為rebase指定的commit,此例為61d3628 。
直接編輯各commit的順序及是否生成merge commit,即可隨心所欲整理merge commits.
下圖為將b2的merge拉直的結果

註解 2020-05-27 113304

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *