本文へ移動
cccskills
無料GitHub で公開日本語紹介

sibling-checkout-commits

同じマシン上にある別のチェックアウトのコミットを、履歴全体のfetchをせずパッチとして順に取り込み、内容を確認しながら記録します。

原文原文の説明を見る

Take commits from a sibling checkout as patches, without a fetch.

JetBrains/intellij-communityスター 20,665(GitHub 20,665 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 別チェックアウトのコミットを取り込みたいとき
  • fetchせず変更だけを移したいとき
  • パッチとローカル変更の競合を確認したいとき
  • 共有インデックスの別変更を混ぜずに記録したいとき

日本語での紹介

できること

同じマシン上の別チェックアウトにあるコミットを、fetchせずにパッチとして取り込む手順を案内します。スクリプトは指定範囲の変更を順番に適用し、作業中の変更と同じパスに触れる場合は停止します。各パッチの適用後には新しいコミットを作成し、パッチIDが一致したことを確認できます。共有インデックスに別セッションがステージしたファイルをコミットへ含めない仕組みや、新規・改名ファイルの扱いも説明します。

こんなときに便利

クローンやworktreeを使わず、別のチェックアウトにある変更だけを現在の作業ツリーへ移したいときに向いています。履歴全体の取得に時間がかかる場合や、変更の順序と取り込み結果を確かめながら作業したい場合に役立ちます。

使い方の例

  • 「隣のチェックアウトにあるmasterまでのコミットをパッチで取り込んで」
  • 「取り込み対象のパッチがローカル変更と衝突しないか確認して」

注意点

パッチが現在のツリーに適用できない場合は、該当パスとコミットを報告して停止し、競合を手作業で解決して同じコミットに含めないよう指示されています。週末のコミッター日付には個人のCLAUDE.mdにある規則を適用します。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(2)

  • SKILL.md3.1 KB
  • scripts/take-patches.sh3.2 KB

SKILL.md(原文)

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

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/sibling-checkout-commits/SKILL.md -->

Commits from a sibling checkout

Use this skill when another checkout of the monorepo on this machine holds commits that this checkout needs, for example a reorganization that a new change builds on. The user keeps the checkouts separate, so a clone, a worktree or a shared directory is not an option.

Why not fetch

A git fetch /path/to/sibling walks and packs objects over the whole history. With a hundred upstream commits of difference it took more than 15 minutes here, and a second fetch of 12 new commits did not finish in 10 minutes. It also leaves a remote-tracking ref and a copy of every object behind. A patch carries only the change.

Procedure

  1. Find the range in the sibling. The base is the last sibling commit this checkout already has; a commit taken before has a new hash here, so compare by subject or by patch id (git patch-id --stable), not by hash.

  2. From the root of the receiving checkout run the script. It writes the patches under out/sibling-patches/, refuses when a patch touches a path that is dirty here, then applies and commits each patch in order:

    ./community/.agents/skills/sibling-checkout-commits/scripts/take-patches.sh ../idea-2 <base>..master
    
  3. Read the ok lines. Each one names the new commit and confirms that its patch id equals the patch. A DIFF line stops the script; the commit on HEAD then holds something else, and the next patch is not applied.

  4. On a weekend, the committer date is today: apply the weekend rule of the personal CLAUDE.md to the new commits.

What the script does, and does not do

  • git apply --binary changes the working tree only. git commit --only -- <paths> builds the commit from HEAD plus those paths, so nothing that a concurrent session staged in the shared index lands in the commit.
  • A path that a patch creates or renames is untracked after the apply, and --only skips an untracked path. The script marks every such path with git add -N first; an intent-to-add entry carries no content.
  • A path that a patch deletes stays in the pathspec, so the commit records the deletion.
  • The author, the date and the message come from the patch through git mailinfo.
  • It does not use git am: git am commits the shared index, and a concurrent session's staged files would land in the commit.
  • It does not fetch, and it creates no ref. Delete a ref of an earlier fetch with git update-ref -d refs/remotes/<name>/master.

When a patch does not apply

A patch of the range depends on the patches before it, so a --check of a later patch alone fails. The script applies in order. When a patch fails against this tree, the sibling and this checkout diverged on that path: stop, name the path and the commit in the report, and let the user decide. Do not resolve the conflict by hand inside a commit that carries the sibling author's name.

レビュー

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

コメント

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

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

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

0 / 1000 文字

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

同じリポジトリのスキル

actions

無料概要あり

IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。

  • IDEに新しいアクションを追加したいとき
  • アクションの登録やアイコンを変更したいとき
  • 表示名と説明文の定義を整理したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

bazel-test-migration

無料概要あり

IntelliJのJPSテストモジュールをBazelへ移行し、Bazelだけで起きる失敗を依存関係や実行環境から切り分ける手順を案内します。

  • JPSテストをBazelへ移行したいとき
  • Bazelだけで起きるテスト失敗を調べたいとき
  • テストの依存関係やデータ設定を確認したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

code-style

無料概要あり

IntelliJのKotlin・Javaコードを新規作成やレビューする際に、言語の選び方、書式、型の扱い、例外処理などのプロジェクト規約に沿って整えるスキルです。

  • IntelliJ規約に沿ってKotlinを書きたいとき
  • Javaコードをレビューしたいとき
  • 例外処理やsealed型の分岐を確認したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

commits

無料概要あり

IntelliJ向けの変更を適切な単位に分け、チケットの有無に応じた形式で、理由や判断も伝わるコミットメッセージを作成・修正するスキルです。

  • チケット付き変更のメッセージを作りたいとき
  • テストやドキュメントのコミットを整理したいとき
  • 既存のコミットメッセージを修正したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

compare-python-typecheckers

無料概要あり

Pythonコードの型推論や型エラーを複数の型チェッカーで比較し、各ツールの判定と診断内容をまとめたレポートを作成します。

  • 型推論の違いを比較したいとき
  • 型エラーになるか確かめたいとき
  • 複数チェッカーの診断を見比べたいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

compose-ui-architecture

無料概要あり

Compose Desktopの画面で状態や副作用をどこに持たせるか整理し、表示と判断の境界、再利用部品やリストの設計を整えます。

  • 画面とプレゼンターの責務を分けたいとき
  • UI状態の置き場所を整理したいとき
  • Effectやコルーチンの使い方を見直したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

JetBrains のスキルをすべて見る

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