Reword one commit prior to merge

时间:2019-03-19 14:50:18

标签: git

So my git history looks something like this:

*
|
*
|\
| \
*  * <- The one I want to reword.
|  |
*  *
| /
|/
*
|
*

And I want to reword the commit message at the location marked above. I have tried, rebase -i and rebase -i -p, but in both cases, I'll have to fix all the merge conflicts in the next commit, which I really don't want to do. Any ideas how I can do this?

1 个答案:

答案 0 :(得分:1)

  • 首先,检出合并的提交,将冲突的文件复制 (或所有文件)。
  • 按照您的方式进行交互式变基。
  • 达到合并提交后,复制回文件。
  • 完成交互式基础调整。