Git Rerere
ELI5 - The Vibe Check
Rerere stands for reuse recorded resolution, and it's git remembering how you resolved a merge conflict so it never has to bother you with the exact same conflict again. Rebasing the same long-lived branch for the tenth time and manually fixing the same three-line conflict every single time? Turn on rerere once, and git just applies your previous fix automatically from then on.
Real Talk
git rerere (reuse recorded resolution) records the state of a conflict and its resolution the first time a developer resolves it manually, then automatically reapplies that same resolution if an identical conflict recurs, which commonly happens during repeated rebases of a long-lived branch against a moving target. It is disabled by default and enabled per repository with git config rerere.enabled true.
Show Me The Code
$ git config rerere.enabled true
$ git rebase main
# resolve the conflict once by hand, then:
$ git add . && git rebase --continue
# next rebase, the same conflict auto-resolves
When You'll Hear This
"Turn on rerere before you rebase this branch for the fifth time this week." / "Rerere just auto-fixed the merge conflict we've hit every rebase."
Related Terms
Long-Lived Branch
A long-lived branch is the feature branch that was supposed to take three days and is now somehow eight weeks old, quietly drifting further from main every...
Merge
Merge is like combining two parallel universes back into one. You take the changes from your branch and smoosh them into another branch.
Rebase
Rebase is like rewriting history.
Semantic Conflict
A semantic conflict is the scariest kind of merge because git doesn't even notice it.