Git.Merge Conflicts
БесплатноБез исполняемых скриптовНе проверенResolve git merge, rebase, or cherry-pick conflicts and finalize the operation
от gpsaggese★ 158 звёзд на GitHubОб этом скилле
Goal
- Given a repo with unresolved Git conflicts, find why each conflict happened, resolve it, verify the result, and finalize the operation
Plan Only (--only_plan)
- With
--only_plan, follow.claude/skills/skill.rules.mdsection "Create Only a Plan with--only_plan" - Write the plan to
git.merge_conflicts.md, then stop without executing the skill- List each conflicted file and its proposed fix
Workflow
Identify the Operation In Progress
- Check whether the repo is in a
merge,rebase, orcherry-pick. Finalizing differs by operation> ls -a .git | grep -E "MERGE_HEAD|rebase-merge|rebase-apply|CHERRY_PICK_HEAD" - Note
<SOURCE>, the branch or commit being merged, rebased, or cherry-picked, and<TARGET>, the branch with existing history (e.g.,mainfor a merge, or the branch rebased onto)
Find the Files with Conflicts
- List the files with conflicts:
> git diff --name-only --diff-filter=U
Understand the Context
- Read the PR description, if any:
> gh pr view- If no PR is open,
gh pr viewfails: skip it and use commit history
- If no PR is open,
- Read the commits on
<SOURCE>and<TARGET>that lead to the conflict, to learn the intent of each side:> git log <TARGET>..<SOURCE> > git log <SOURCE>..<TARGET>
Propose Fixes
For each file with conflicts:
- List every conflict hunk (a file can have several
<<<<<<</=======/>>>>>>>blocks) - For each hunk, or group of similar hunks, explain the cause and propose a fix
- List every conflict hunk (a file can have several
Example
1. tutorials/GitHub_Stats/Master_GitHub_analysis.py - **Issue**: Jupytext version conflict. - **Resolution**: Use <TARGET>, it's the newer version. 2. tutorials/GitHub_Stats/docker_jupyter.sh - **Issue**: <SOURCE> adds -e GITHUB_ACCESS_TOKEN to Docker env; <TARGET> removes it. - **Resolution**: Use <TARGET> (remove the line)If unsure, prefer the changes from
<SOURCE>over<TARGET><TARGET>'s history is already saved, but discarding<SOURCE>'s changes could lose them permanently
Ask User and Apply the Changes
- Ask the user which resolution to apply for each ambiguous case
- Edit each conflicted file to remove the markers and apply the chosen resolution
- Confirm no conflict markers remain:
> grep -rn '^<<<<<<<\|^=======\|^>>>>>>>' <RESOLVED_FILES> - Stage each resolved file:
> git add <FILE>
Finalize the Operation
- You MUST ask for user permission before finalizing, per the repo rule of never committing without permission
- Once approved, finalize per the operation identified above:
merge:git commitrebase:git rebase --continuecherry-pick:git cherry-pick --continue
- Do not skip hooks (e.g.,
--no-verify) or force anything unless the user explicitly asks for it
Verification
-
--only_plan(check only this item): the plan is ingit.merge_conflicts.mdin the current dir, has theGenerated byline, and nothing was executed - If created, the output file is
git.merge_conflicts.mdin the current dir - Run the related unit tests
- Confirm no conflict markers
<<<<<<</=======/>>>>>>>remain - Confirm the operation finished cleanly:
> git status - The file
git.merge_conflicts.md, if created, says that it was generated by.claude/skills/git.merge_conflicts/SKILL.md
Ask for Help If Unsure How to Do
- If the task is not perfectly clear, you MUST not perform it, but ask for
clarifications
- For a complex task, create
git.merge_conflicts.mdin the current dir, with 5 bullet points explaining the plan - Say in that file how it was generated, with this line as the first bullet:
- Generated by `.claude/skills/git.merge_conflicts/SKILL.md`
- For a complex task, create
Установить Git.Merge Conflicts в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Git.Merge Conflicts?
Resolve git merge, rebase, or cherry-pick conflicts and finalize the operation
Как установить скилл Git.Merge Conflicts?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Git.Merge Conflicts запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic