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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
rerereis enabled,gitwill 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 rererecommand is here – git-rerere(1).