Skip to content
Development
Skill

/conflicts

Resolve git merge conflicts from a rebase, merge, or cherry-pick. Use also for a request to finish the operation and push, such as "fix conflicts and push".

From plugin
claude
1882 skills12 agents1 MCP

Claude Code

$ npx -y skills add bendrucker/claude --skill conflicts --agent claude-code

SKILL.md

conflicts.SKILL.md
name: git:conflicts
description: Resolve git merge conflicts from a rebase, merge, or cherry-pick. Use also for a request to finish the operation and push, such as "fix conflicts and push".
argument-hint: "[--push]"
effort: high
allowed-tools:
  - Read
  - Edit
  - Grep
  - Glob
  - AskUserQuestion
  - Bash(git status:*)
  - Bash(git diff:*)
  - Bash(git show :*:*)
  - Bash(git add:*)
  - Bash(git log:*)
  - Bash(git rebase:*)
  - Bash(git merge:*)
  - Bash(git cherry-pick:*)
  - Bash(git rerere:*)
  - Bash(git stash:*)
  - Bash(git update-index:*)
  - Bash(git fetch:*)
  - Bash(git push:*)
  - Bash(bun ${CLAUDE_PLUGIN_ROOT}/skills/conflicts/scripts/*)
hooks:
  PreToolUse:
    - matcher: "Bash(git commit:*)|Bash(git rebase --continue:*)|Bash(git merge --continue:*)|Bash(git cherry-pick --continue:*)"
      hooks:
        - type: command
          command: "bun ${CLAUDE_PLUGIN_ROOT}/skills/conflicts/scripts/check-markers.ts"

Git Conflicts

Status

!`bun ${CLAUDE_PLUGIN_ROOT}/skills/conflicts/scripts/status.ts`

Context

!`bun ${CLAUDE_PLUGIN_ROOT}/skills/conflicts/scripts/context.ts`

Upstream

!`bun ${CLAUDE_PLUGIN_ROOT}/skills/conflicts/scripts/upstream.ts`

Resolving

Resolve each conflicted file, then `git add` it.

  • Regenerate a generated file, such as a lockfile or a build artifact, from its source. Follow the project's `CLAUDE.md` for lockfile guidance.
  • When repeated rebases hit the same conflict, [references/rerere.md](references/rerere.md) records a resolution and replays it.

Resolving is done when every conflicted file is staged and `git diff --cached --check` reports no conflict markers. Leave the commit, the continue, and the push to the user.

Completing the Operation

Take the operation past the staged resolution only when the user asks for it: the `--push` argument, its alias `push`, or a request such as "fix conflicts and push". Then:

1. When no rebase, merge, or cherry-pick is in progress and upstream has diverged, run `git merge origin/<default-branch>` to produce the conflicts. A clean merge goes straight to the push. 2. Before continuing, set aside the dirty files unrelated to the resolution, which `git status --porcelain` lists. The continue then commits only the resolution. Run `git stash push -m "conflicts: <branch>" -- <files>` for all of them at once, then record that entry's SHA from `git stash list --format='%H %gs'`. When that stash fails, which the sandbox causes by blocking the unlink of a protected file such as `.mcp.json`, stash the files one at a time and skip the failures. Hide each file that cannot be stashed with `git update-index --assume-unchanged <file>`. 3. Continue the operation and run `git push`, with `--force-with-lease` after a rebase, then restore the files you set aside: `git update-index --no-assume-unchanged <file>` for each hidden file, and `git stash apply <sha>` then `git stash drop <sha>` for a stash you created. Restore by the SHA you recorded, because the stash stack is shared with every other worktree on the repo and the top entry may belong to another session.

The operation is done when git reports no operation in progress, the branch is pushed, and every file you set aside is back in the working tree.

Read more
@bendrucker
Ships withclaude

My personal plugin marketplace for Claude Code, Anthropic's AI coding assistant.

1882 skills12 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
18
Star history of bendrucker/claude on GitHub, a chart by star-history.com

Other skills on claude.

cli

cli

Type-safe CLI argument parsing with commander and @commander-js/extra-typings, the standard parser for this repo's Bun scripts.…

@bendrucker@bendruckerInstall Skill
prose-lab

prose-lab

Turn the user's labels on repo prose, or their notes from reviewing a document in Plannotator, into calibrated Vale rules.

@bendrucker@bendruckerInstall Skill
activity

activity

Report real device usage from ActivityWatch. Covers per-app time, window titles, and active vs idle spans. Use when asked "what…

@bendrucker@bendruckerInstall Skill
agent-team

agent-team

Orchestrating Claude Code agent teams. Use when creating teams, spawning teammates, assigning tasks, configuring teammate modes,…

@bendrucker@bendruckerInstall Skill
handoff

handoff

Hand the current conversation off to a fresh background agent that picks up the work immediately, so you can step away and track…

@bendrucker@bendruckerInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about conflicts.

Which coding agents can use conflicts?
conflicts installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.