git合并多个提交的逻辑: 把当前提交合并到前一次提交
2种合并的方式
指定合并提交的个数: git rebase -i HEAD~3
指定合并到哪个提交: git rebase -i 3a4226b, 注意: 3a4226b并不参与合并, 实际合并到3a4226b后一次提交
指令解释(交互编辑时使用):
- p, pick = use commit
- r, reword = use commit, but edit the commit message
- e, edit = use commit, but stop for amending
- s, squash = use commit, but meld into previous commit
- f, fixup = like "squash", but discard this commit's log message
- x, exec = run command (the rest of the line) using shell
- d, drop = remove commit
参考资料
953

被折叠的 条评论
为什么被折叠?



