Git's rerere Feature Can Automatically Reuse Your Past Conflict Resolutions
Git includes a built-in feature called rerere (reuse recorded resolution) that remembers how a developer resolved a merge conflict and replays that resolution if the identical conflict appears again. Once enabled via a single config setting, Git stores a preimage of each conflict and the corresponding postimage resolution under the .git/rr-cache/ directory. By default, rerere writes the saved resolution into the file but leaves it unstaged, allowing the developer to inspect the result before proceeding. An optional autoupdate setting can also stage the file automatically, though the rebase or merge operation still pauses for a manual review. Recorded resolutions can be discarded with git rerere forget, and rerere only triggers when a conflict matches byte-for-byte, so any change to either side of a conflict prompts a fresh resolution.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in