git reword without resolving merge conflicts again

前端 未结 2 796
小蘑菇
小蘑菇 2020-12-09 04:38

Is it possible to change commit messages using git rebase, but without having to re-resolve merge conflicts?

I need to bowdlerize an older repo and I don\'t want to

2条回答
  •  萌比男神i
    2020-12-09 05:23

    There's a little-known feature of git called "Reuse Recorded Resolutions", or rerere.

    You can enable it globally by running git config --global rerere.enabled true.

    If rerere is enabled, git will automatically save conflict resolutions, and will reuse those resolutions later if it encounters the same conflicts. This has the net result of not requiring the user to re-resolve these previously seen conflicts.

    The feature is explained here - Git - Rerere.

    The documentation for git rerere command is here - git-rerere(1).

提交回复
热议问题