本文へ移動
cccskills
無料GitHub で公開

git-resolve-conflicts

Resolve unmerged paths from a pending merge, rebase, cherry-pick, or stash pop, then continue the operation and commit. Use when invoked as `$git-resolve-conflicts` or when the user asks to resolve conflicts and commit.

日本語の概要は準備中です。原文の説明を表示しています。

phatblat/dotfilesスター 13(GitHub 13 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(2)

  • SKILL.md3.4 KB
  • agents/openai.yaml43 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

git-resolve-conflicts

Resolve every unmerged path in the current worktree, continue whatever git operation is pending, and commit the result.

Workflow

  1. Inspect state:

    git status
    git ls-files -u
    

    Identify the pending operation:

    • MERGE_HEAD / rebase-merge / rebase-apply / CHERRY_PICK_HEAD / REVERT_HEAD present -> merge/rebase/cherry-pick/revert.
    • Otherwise (unmerged paths but no HEAD pointer) -> likely a stash pop conflict or manual merge; resolve in place.

    List the conflicted files: git diff --name-only --diff-filter=U.

  2. For each conflicted file, inspect the three stages:

    git show :1:<path>   # base
    git show :2:<path>   # ours (HEAD / current branch)
    git show :3:<path>   # theirs (incoming / stashed)
    

    And the working-tree conflict markers.

  3. Resolve per file using these rules:

    • Machine-generated / filtered state files (e.g. .codex/*.config.toml trust hashes, lockfiles): keep ours (git checkout --ours <path>); the clean filter re-normalizes on git add.
    • Dependency / version bumps: keep the higher version; if already upstream, --skip the commit.
    • Deliberate config updates (incoming value intended): take theirs (git checkout --theirs <path>).
    • Generated artifacts: regenerate from source, then stage.
    • Stash-pop conflicts where the stash is stale (its changes already present in HEAD): keep ours for every file; the stash adds nothing.
    • Hand-written source with a genuine semantic collision: pause and ask the user before choosing; never guess.
    • JSON / JSONL / TOML data files with duplicate or contradictory rows: drop duplicates and obviously bogus rows (downgrades, empty values, format-only changes), keeping one clean copy of each legitimate entry.

    When a file has conflict markers, remove the markers and keep the chosen side's content. For 3-way markers (<<<<<<< / ||||||| / ======= / >>>>>>>), select the intended side and delete the marker lines.

  4. Stage every resolved file:

    git add <path> ...
    
  5. Verify no conflict markers remain:

    git diff --check
    

    If any remain, fix before continuing.

  6. Continue the pending operation:

    • Merge: git commit (use the prepared MERGE_MSG).
    • Rebase/cherry-pick: git rebase --continue (or --skip if the commit became empty) / git cherry-pick --continue.
    • Revert: git revert --continue.
    • Stash pop / manual: nothing to continue; proceed to commit.
  7. If the working tree now has changes relative to HEAD, commit them using the project's commit convention (see git-commit skill). If the tree is clean, report that there was nothing to commit.

  8. Report: which files conflicted, how each was resolved, and the resulting commit (or "nothing to commit").

Notes

  • Never run git stash (push/pop/apply/drop) in a shared workspace; resolve conflicts in place and leave the stash list untouched if dropping is blocked.
  • Do not force-resolve hand-written source collisions without user confirmation.
  • Prefer the version already in HEAD when the incoming change is a stale duplicate.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

2ndbrain

無料

Quick-save the last assistant response as a verbatim note in the 2ndBrain Obsidian vault (~/2ndBrain/quick-notes/<year>/). Use when the user asks to quick-save/save the last response to 2ndBrain, or invokes $2ndbrain or /skill:2ndbrain.

日本語の概要は準備中です。原文の説明を表示しています。

phatblat/dotfiles132026年10月29日 更新

Write commit messages under the agent-commits convention - a Conventional Commits fork with no chore catch-all, intent-only type tokens, facts in trailers, and legally-grounded AI provenance (Assisted-by, never Co-authored-by). Use when composing a commit in a repo whose commitlint.config.js extends agent-commits, when deciding between feat/fix/refactor/perf, or when recording AI participation.

日本語の概要は準備中です。原文の説明を表示しています。

phatblat/dotfiles132026年10月29日 更新

Coordinate multi-agent work through durable artifacts in git instead of chat. Use this whenever a task involves sending a message to another agent, agent mailboxes or handoffs, claiming work from a shared queue, notifying another agent or crew (OpenClaw, Grok Bot, Claude Code, Codex, Gas Town/Gas City workers) that work is ready, or whenever the user mentions the artifact bus, message bus, agent mail, beads mail, doorbells, or pings between agents — even if they don't say "bus" explicitly.

日本語の概要は準備中です。原文の説明を表示しています。

phatblat/dotfiles132026年10月29日 更新

aven

無料

Use aven to find tasks, update status, and leave durable handoff context.

日本語の概要は準備中です。原文の説明を表示しています。

phatblat/dotfiles132026年10月29日 更新

Plan, order and deliver a batch of backlog items (e.g. every High item) in a Conventional Docs repo, one decision, branch, worktree, draft PR, review and merge per item. Use when asked to work through the backlog, implement all items of a priority, or sequence several backlog items end to end.

日本語の概要は準備中です。原文の説明を表示しています。

phatblat/dotfiles132026年10月29日 更新

boris

無料

Claude Code workflow tips from Boris Cherny (creator of Claude Code) and the Claude Code team. Use when: setting up Claude Code, optimizing workflows, running parallel sessions, configuring CLAUDE.md, using skills/commands, subagents, hooks, MCP integrations, or learning best practices. Covers: git worktrees, plan mode, verification, permissions, Slack MCP, BigQuery, prompting tips, plugins, custom agents, sandboxing, keybindings, status lines, output styles, customization, /simplify for code quality, /batch for parallel code migrations, /loop for scheduled tasks, code review agents, /btw for mid-task questions, /effort max reasoning, remote control sessions, voice mode, setup scripts, session naming, /color, PostCompact hook, auto mode, /schedule cloud jobs, iMessage plugin, auto-memory, and auto-dream, mobile app, session teleporting, Cowork Dispatch, Chrome extension, Desktop app, /branch forking, --bare SDK startup, --add-dir multi-repo, --agent custom agents, /voice input.

日本語の概要は準備中です。原文の説明を表示しています。

phatblat/dotfiles132026年10月29日 更新

phatblat のスキルをすべて見る

このスキルの問題を報告する