Merge conflicts are a perennial headache for developers, but Git has a built-in secret weapon to stop fighting the same battles over and over. The feature, known as Reuse Recorded Resolution (or rerere for short), remembers how you resolved a conflict the first time and automatically applies that resolution in future merges.
Activated with the command:
git config --global rerere.enabled true
Once enabled, Git records the hunks you manually resolve. The next time it encounters the same conflict in the same files, it replays your previous decision without interrupting your workflow.
"Stop fighting the same merge conflicts over and over — Git remembers so you don't have to."
This is especially useful when rebasing branches multiple times, cherry-picking commits, or working on long-running feature branches that are merged into a constantly changing main branch.
To see rerere in action, use:
git rerere status
git rerere diff
rerere is a quiet productivity booster that many developers overlook. Enable it once and let Git handle the repetitive conflict resolution, freeing you to focus on code quality instead of manual merging.