Reuse resolved Git conflicts with rerere

8 steps · about 2 h 35 min · Intermediate

  1. Understand recorded resolution reuse (reference, Git documentation, 25 min)

    Learn what preimages and postimages Git records and when it can replay them.

  2. Enable rerere deliberately (guide, Pro Git, 22 min)

    Walk through a recorded resolution and understand the repository setting that activates it.

  3. Preview a merge without changing the worktree (reference, Git documentation, 20 min)

    Produce and inspect merge results before staging a real repeated resolution.

  4. Inspect unmerged index stages (reference, Git documentation, 15 min)

    Identify every conflicted path and its stage entries before resolving content.

  5. Review replayed changes with a comparison tool (reference, Git documentation, 20 min)

    Compare the working resolution instead of trusting a reused result blindly.

  6. Recreate conflict sides when needed (reference, Git documentation, 18 min)

    Restore ours or theirs for a path when the reused resolution needs to be rebuilt.

  7. Understand how a resolution enters the index (reference, Git documentation, 15 min)

    Learn what marking a verified path resolved changes beneath porcelain commands.

  8. Integrate a merge tool without hiding rerere (reference, Git documentation, 20 min)

    Use a visual or configured tool while retaining explicit review of the recorded result.