git-rerere
Skill0 starsChanged 39 days agoMITView on GitHub
Use when the same merge conflicts keep recurring across rebases or long-running integration branches — enables automatic replay of previously-recorded resolutions
- Deletes or force-pushes
In this repository66 other files it gives its agents.
- AGENTS.mdAGENTS.md
- postgres-locking-joinsSkill
- ai-bug-patternsSkill
- compressed-ndjson-boundariesSkill
- http-resume-integritySkill
- linux-io-latency-triageSkill
- macos-disk-space-recoverySkill
- minimal-sufficient-evidenceSkill
- modularize-large-filesSkill
- patch-reproducer-validitySkill
- prompt-cache-boundariesSkill
- proton-drive-selective-backupSkill
- transactional-outbox-deliverySkill
- conventional-commitsSkill
- git-advanced-mergingSkill
- git-bisect-forensicsSkill
- git-data-recoverySkill
- git-hooksSkill
- git-reset-mechanicsSkill
- git-revisions-syntaxSkill
- git-rewriting-historySkill
- git-submodulesSkill
- git-worktreesSkill
- github-ssh-keysSkill
- npm-publish-ci-pitfallsSkill
- sapling-stacked-pr-workflowSkill
- go-concurrency-patternsSkill
- go-data-idiomsSkill
- go-error-handlingSkill
- go-interfaces-embeddingSkill
- go-pprof-profilingSkill
- marketing-funnel-diagnosisSkill
- marketing-geo-experimentsSkill
- marketing-incrementalitySkill
- marketing-positioning-testsSkill
- python-descriptors-mroSkill
- python-logging-cookbookSkill
- python-scaling-regression-testsSkill
- python-unicode-gotchasSkill
- rust-compile-time-invariantsSkill
- rust-deterministic-concurrency-testsSkill
- rust-error-identity-boundariesSkill
- rust-regex-search-contractsSkill
- rust-runtime-bug-classesSkill
- rust-tokio-actor-deliverySkill
- rust-tokio-cancellation-safetySkill
- sales-discovery-qualificationSkill
- sales-mutual-action-plansSkill
- sales-pipeline-forecast-calibrationSkill
- sales-value-negotiationSkill
- ai-triage-evaluationSkill
- container-image-patchingSkill
- dependency-artifact-integritySkill
- dnssec-sentinel-diagnosticsSkill
- iam-policy-change-replaySkill
- rbvm-applicabilitySkill
- rbvm-asset-evidenceSkill
- rbvm-guarded-remediationSkill
- rbvm-priority-decisionsSkill
- rbvm-risk-exceptionsSkill
- The first 60 shown.
The file
Files
Git Rerere (Reuse Recorded Resolution)
Rerere fingerprints conflict hunks + resolutions. On any later merge/rebase/cherry-pick producing the same conflict, Git auto-applies the stored fix.
Enable
git config --global rerere.enabled true
git config --global rerere.autoupdate true # also stage auto-resolved filesStorage: .git/rr-cache/<hash>/{preimage,postimage}. Local, not pushed.
Commands
git rerere status # files with recorded preimages
git rerere diff # current vs recorded resolution
git rerere remaining # unresolved files
git rerere forget <file> # discard a recorded resolution
git rerere gc # prune old entriesFlow
- First conflict:
Recorded preimage for 'file'. - Resolve + commit:
Recorded resolution for 'file'. - Next time the same conflict appears:
Resolved 'file' using previous resolution.— withautoupdate, already staged.
Canonical Uses
- Long-running topic branch rebased onto main repeatedly.
- Nightly integration branches that merge many topics, reset, re-merge.
- Test-merge-and-reset to pre-record resolutions:
git merge feature && git reset --hard HEAD~ # resolution is recorded; next merge applies it automatically
Sharing
rr-cache isn't pushed. Copy between checkouts:
rsync -a .git/rr-cache/ other-repo/.git/rr-cache/Pitfalls
- Matches exact conflict content — whitespace/ordering drift breaks the match. Check
git rerere diffbefore trusting auto-resolution. - With
autoupdate=true, a bad past resolution silently re-applies. Spot-check. - Auto-resolved files show no conflict markers; use
git rerere forget <file>to re-surface for manual redo.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

