branchless-workflow
БесплатноБез исполняемых скриптовНе проверенGit-branchless stacked diffs workflow patterns and command reference
от jpoutrin★ 16 звёзд на GitHubОб этом скилле
Git-Branchless Workflow
Git-branchless enables stacked diffs development - working with multiple commits that build on each other, editing any commit in the stack, and managing PRs efficiently.
Core Concepts
Detached HEAD Workflow
In git-branchless, you work in detached HEAD mode. Main stays put while you stack commits above it.
# Always detach before building a stack
git checkout --detach
# Or use git record -d to auto-detach
git record -d -m "feat: first commit"
Smartlog Icons
| Icon | Meaning |
|---|---|
◆ |
Public commit (on main branch) |
◯ |
Draft commit (your work in progress) |
● |
Current HEAD position |
✕ |
Abandoned/hidden commit |
ᐅ |
Current branch indicator |
Essential Commands
Visualization
git sl # View commit stack (smartlog)
Navigation
git prev # Move to parent commit
git next # Move to child commit
git prev N # Jump N commits up
git next N # Jump N commits down
git sw -i # Interactive commit selector (fuzzy finder)
git sw -i <search> # Pre-filter by search term
Committing
git record -m "msg" # Commit all changes (no git add needed)
git record -c pr/name -m "msg" # Commit + create branch in one step
git record -d -m "msg" # Detach from branch, then commit
git record -I -m "msg" # Insert commit in middle, auto-rebase children
Editing Commits
git amend # Amend current commit + auto-restack descendants
git reword # Change commit message + auto-restack
git restack # Rebase descendants onto amended commit
Moving Commits
git move -s <src> -d <dst> # Move commit(s) to new parent
Syncing
git sync # Rebase stack onto local main
git sync --pull # Fetch remote + rebase stack
Submitting PRs
git switch -c pr/name # Create branch at current commit
git submit -c @ # Push current branch to remote (first time)
git submit # Force-push existing branches (update PRs)
Housekeeping
git hide <hash> # Hide commit from smartlog
git unhide <hash> # Restore hidden commit
Recovery
git undo # Undo last operation (with confirmation)
git undo -i # Interactive undo — browse history
Common Workflows
Building a Stack
git checkout --detach
git record -m "feat: first feature"
git record -m "feat: second feature"
git record -m "feat: third feature"
git sl # View your stack
Fixing a Middle Commit
git prev 2 # Go to the commit to fix
# make changes...
git add . && git amend # Amend + restack descendants
git next 2 # Return to top
Creating PRs for a Stack
# For each commit, create branch and submit
git prev 2
git switch -c pr/first-feature
git submit -c @
git next
git switch -c pr/second-feature
git submit -c @
git next
git switch -c pr/third-feature
git submit -c @
Setting Stacked PR Base Branches
For true stacked PRs on GitHub:
| PR | Base Branch |
|---|---|
| pr/first-feature | main |
| pr/second-feature | pr/first-feature |
| pr/third-feature | pr/second-feature |
After PR Merge
git pull origin main
git sl # Find merge commit hash
git move -s <next-commit> -d <merge-commit-hash>
# Recreate branches for remaining commits
git switch -c pr/remaining-feature
git submit -c @
Syncing with Updated Main
git sync --pull # Fetch + rebase stack
git submit # Update all PRs
Recovering from Mistakes
git undo -i # Browse history, find good state, restore
Interactive Rebase Operations
git rebase -i main
In the editor:
pick— keep commit as-isdrop— remove commitfixup— squash into previous (discard message)squash— squash into previous (combine messages)- Reorder lines to change commit order
Best Practices
- Always detach before stacking - Use
git checkout --detachorgit record -d - Use
git amendinstead ofgit commit --amend- It auto-restacks descendants - Use
git recordinstead ofgit add+git commit- Simpler workflow - Run
git restackafter manual amends - Fixes abandoned commits - Use
git sync --pullregularly - Keep stack updated with main - Create branches only when ready to PR - Use
git switch -corgit record -c - Force-push updates with
git submit- Updates all stacked PRs at once
Troubleshooting
"Abandoned commits (✕) showing in smartlog"
git restack # Rebase descendants onto amended commit
"git sl only shows main / no stack visible"
You committed on main. Fix:
git checkou
Установить branchless-workflow в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл branchless-workflow?
Git-branchless stacked diffs workflow patterns and command reference
Как установить скилл branchless-workflow?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл branchless-workflow запускает скрипты?
Нет, скилл состоит только из инструкций (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