resolving-conflicts
Skill0 starsChanged 50 days agoMITView on GitHub
Use when a merge, rebase or cherry-pick stops on a conflict, or when integrating a branch across a rename, move or other refactor made on the other side.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dotnet/dotnet-dockertheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dotnet/dotnet-docker★ 4.9ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- capturing-decisionsSkill
- choosing-subagent-modelsSkill
- committing-changesSkill
- debugging-systematicallySkill
- delegating-workSkill
- designing-changesSkill
- exploring-a-codebaseSkill
- injecting-dependenciesSkill
- planning-changesSkill
- pruning-testsSkill
- reflecting-on-changesSkill
- reviewing-codeSkill
- verifying-changesSkill
- writing-commentsSkill
- writing-logsSkill
- writing-project-instructionsSkill
- writing-skillsSkill
- writing-testsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Look for a refactor: R, a D beside an A, a deleted file, a subject saying rename, extract, move or replace.
- Very specific: line 25
Do the same for "$fork"..HEAD — when your branch refactored, the base may have gained code in the old shape.
- Very specific: line 30
Use git -c merge.conflictStyle=zdiff3 <merge|rebase> ….
- Very specific: line 67
Leave no broken commit for a later bisect.
- Distinctive: line 69
Adapting one side takes more change than that side made: stop and say so. That is work to redo on top of the refactor, and the human …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Resolving conflicts
A conflict is two intents meeting, not two texts. Picking a side per line, or pasting both halves, produces code neither author wrote. Work out what each side meant, and write code that does both.
The hard case is a refactor on one side: it causes the hardest conflicts, and also breaks code git merges without a word.
Read what the other side did first
fork=$(git merge-base <base> HEAD)
git log --oneline "$fork"..<base>
git diff -M --name-status "$fork" <base>- Look for a refactor:
R, aDbeside anA, a deleted file, a subject saying rename, extract, move or replace. Write down each old name with its new one. - Do the same for
"$fork"..HEAD— when your branch refactored, the base may have gained code in the old shape.
Know which side is which
Use git -c merge.conflictStyle=zdiff3 <merge|rebase> …. The middle part, after |||||||, is the
common ancestor: middle→top is one side's change, middle→bottom the other's.
| Operation | Top (HEAD) | Bottom | The incoming commit |
| Merging the base into a branch | the branch | the base | MERGE_HEAD |
| Rebasing a branch onto the base | the base, plus the commits replayed so far | the commit being replayed | REBASE_HEAD |
| Cherry-picking | the current branch | the picked commit | CHERRY_PICK_HEAD |
A rebase swaps the sides. "Ours" there keeps the base and drops your change.
Resolve onto the refactored side
- Find the refactor's commit:
git log -p "$fork"..<base> -- <file>, orgit log -S'<old name>' "$fork"..<base>. - Start from the refactored side and re-apply the other side's intent in the new shape — new name, signature, location. Restoring the old shape to make a hunk fit leaves two conventions.
- Follow moved code. The change goes where the code lives now, maybe a file with no markers. A file the other side deleted or moved is not re-added at its old path.
- Unclear resolution: stop and ask. A guessed resolution reads as deliberate in every later diff.
A clean merge can still be wrong
Git compares text. A new call to a renamed function, a subclass of a moved type, a file in a deleted directory — none conflict, all break. In a scratch repo, a new file calling a renamed function passed both merge and rebase without a conflict and failed on import.
- For every old name on your list:
git grep -n '<old name>'. Every hit outside comments and changelogs is code to update, whichever side wrote it. - Then build and test the integrated tree —
vvkit:verifying-changes. The grep finds renames only, not a changed default, a reordered argument, a call that now happens twice.
| Operation | The fix lands in |
| Merge | The merge commit itself — merge with --no-commit, so the merge commit builds |
| Rebase | The branch commit it belongs to: git commit --fixup <commit>, then GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash <base> |
- Leave no broken commit for a later
bisect.git rebase --exec '<build command>' <base>stops at the first commit that fails to build. - Adapting one side takes more change than that side made: stop and say so. That is work to redo on top of the refactor, and the human decides.
Source for the term: Martin Fowler, "SemanticConflict".
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.

