بنقرة واحدة
stack-split
Break a large commit into a reviewable stack of small atomic commits
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Break a large commit into a reviewable stack of small atomic commits
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Fetch and distill a repo's wiki, docs, and issues into a focused reference doc
Absorb staged changes into the correct commits in the current stack
Restructure a range of commits into a clean, atomic stack ordered by concern
Sync stack with main, run tests, and submit all branches to remote
Run tests or formatters across all commits in a stack
| name | stack-split |
| description | Break a large commit into a reviewable stack of small atomic commits |
| argument-hint | [commit] |
Split a large commit into multiple smaller, atomic commits. Target commit defaults to HEAD if not specified.
Check branchless init:
if [ ! -d ".git/branchless" ]; then git branchless init; fi
Identify the target commit. If $ARGUMENTS is provided, use it.
Otherwise default to HEAD.
Analyze the commit to understand what it contains:
git show --stat <commit>
git show <commit>
Read the full diff. Identify logical groups:
Documentation belongs with the feature it documents, not as a separate split. Dependencies and config files go in the commit that first uses them.
Propose a split plan to the user. For each proposed commit:
Wait for user approval before proceeding.
Perform the split using interactive rebase:
git rebase -i <commit>^
Mark the target commit as edit, then:
git reset HEAD^
This unwinds the commit but keeps all changes in the working tree.
Stage and commit each group in the agreed order:
git add -p # or git add <specific-files>
git commit -m "descriptive message for this group"
Repeat for each logical group. Each commit must:
Complete the rebase:
git rebase --continue
Restack if there are downstream commits:
git restack
Verify the result:
git sl
Show the user the new stack. If a test command is available, run tests across the new commits:
git test run -x '<test-command>' 'stack()'
If the user wants to restructure multiple commits (not just split one):
git reset --soft main — uncommit everything, keep changesgit restore --staged . — unstage to working treegit add -pgit sl and testsgit add -p to split
hunks within the file