【发布时间】:2016-11-27 04:03:58
【问题描述】:
我知道,我可以做一个交互式 rebase,reword first commit 和 fixup all other。但是如果一个分支包含数百个提交,它就会变得非常乏味。
有没有更简单的方法?
【问题讨论】:
-
git checkout -b <another-branch> && git reset --soft <first-commit-sha> && git commit? -
如果你有一个带有行号的文本编辑器,那么识别需要更改的行然后进行批量替换应该不难。