Skip to content
cccskills
FreePublished on GitHub

sibling-checkout-commits

Transfer commits from a sibling checkout by applying their patches in order, without fetching repository history. The script checks for dirty-path conflicts, verifies patch IDs, and commits each change while avoiding unrelated staged files in the shared index.

OriginalShow the original description

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

JetBrains/intellij-community20,664 stars(GitHub 20,664 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Taking commits from a sibling checkout without fetching
  • Applying a sequence of patches from another checkout
  • Checking for conflicts on paths with local changes
  • Avoiding unrelated staged files when committing patches

Files included (2)

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

SKILL.md (original)

Review the instructions the agent will receive before you install.

<!-- 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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

actions

FreeSummary

Implement or update IntelliJ `AnAction` classes and their `plugin.xml` registrations. Keep labels and descriptions in message bundles, configure optional icons, and launch suspending work through the event coroutine scope so synchronous action handling does not freeze the IDE.

  • Adding a new IntelliJ action
  • Updating an action's registration or icon
  • Moving action labels into a message bundle
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

Move IntelliJ JPS test modules to Bazel and diagnose failures that occur only under Bazel. The guide helps trace missing dependencies, plugins, test data, and runfiles, then verify the generated target and migrated tests.

  • Migrating a JPS test module to Bazel
  • Diagnosing a test failure that occurs only in Bazel
  • Checking Bazel dependencies and test data wiring
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

code-style

FreeSummary

Write or review Kotlin and Java code in line with IntelliJ project conventions. The guidance covers language choice, formatting, sealed types, threading annotations, and safe handling of control flow exceptions so changes fit the surrounding codebase.

  • Writing a new Kotlin file that follows IntelliJ conventions
  • Reviewing Java code and checking its style guidance
  • Checking formatting, sealed-type handling, or exception handling
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

commits

FreeSummary

Create, amend, or rename IntelliJ commits with messages that follow the project’s ticket and label formats. Keep each commit focused, explain the reason and decision in the body when needed, and pass the message safely through the shell or PowerShell.

  • Writing a message for a change linked to a YouTrack ticket
  • Preparing a commit message for tests, cleanup, or documentation
  • Amending or renaming an existing IntelliJ commit
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

Compare how Python type checkers interpret a code snippet or file. The script runs selected tools, including ty, pyrefly, basedpyright, mypy, and zuban, then produces a Markdown report with verdicts, timings, and each checker's diagnostic output.

  • Comparing type inference for a Python snippet
  • Checking whether a Python expression should be a type error
  • Reviewing differences among Python type checkers
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

Shape Compose Desktop UI code by keeping composables focused on rendering and placing application decisions in presenters or coordinators. Get guidance on state ownership, effects, reusable component APIs, lazy-list keys, animation, and performance for individual UI changes.

  • Separating screen rendering from application decisions
  • Choosing which UI state belongs in composition
  • Structuring effects and coroutine work
JetBrains/intellij-community20.7KUpdated Oct 26, 2026

See all skills by JetBrains

Report a problem with this skill