Skip to main content

git-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".

소스 정보

저장소
bendrucker/claude
최근 소스 활동
2026년 11월 3일 05:25
감지된 SKILL.md 언어
영어
스타
18
포크
1

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
8 개 파일

SKILL.md 표시 중

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":"[Truncated]"}]}
# 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.
GitHub에서 보기