Patrick Chilton Patrick Chilton - 1 year ago 111
Git Question

git reword without resolving merge conflicts again

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 change any of the actual code, just the messages. I've tried --preserve-merges.

Answer Source

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 1.

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 further in a post on For more detail, look at the help document for git rerere.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download