Skip to content
Latchkey

git rerere: Usage, Options & Common CI Errors

git rerere remembers how you resolved a conflict and reapplies it next time the same conflict appears.

On long-running branches that rebase repeatedly, rerere ("reuse recorded resolution") saves you from solving the same conflict over and over by replaying your earlier fix.

What it does

When enabled, git rerere records the pre-image and your resolution of each conflict. The next time an identical conflict occurs, it auto-applies the stored resolution and stages the result.

Common usage

Terminal
git config --global rerere.enabled true
git rerere status               # conflicts being recorded
git rerere diff                 # what the recorded resolution changes
git rerere forget <path>        # discard a bad recorded resolution

Options

SubcommandWhat it does
(config) rerere.enabledTurn the feature on
statusShow conflicts currently tracked
diffShow the recorded resolution diff
forget <path>Drop a recorded resolution
gc / clearPrune the recorded-resolution cache

Common errors in CI

rerere state lives under .git/rr-cache, which is local and not cloned - fresh CI checkouts have no recorded resolutions, so it helps persistent workspaces, not ephemeral runners. A wrong auto-resolution is silent; if rerere reapplies a bad fix, run git rerere forget <path> and re-resolve.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →