Remove merged branches from stack and reconnect children
/plugin marketplace add settlemint/agent-marketplace/plugin install crew@settlemintgit/<worktree_status>
!${CLAUDE_PLUGIN_ROOT}/scripts/git/worktree-context.sh
</worktree_status>
<stack_context>
!${CLAUDE_PLUGIN_ROOT}/scripts/git/machete-context.sh
</stack_context>
<what_happens>
.git/machete</what_happens>
<process>If in a WORKTREE:
⚠️ Slide-out can be problematic in worktrees:
--delete won't work for branches with active worktreesAskUserQuestion({
questions: [
{
question: "You're in a worktree. Which branch to slide out?",
header: "Branch",
options: [
{
label: "A different branch",
description: "Slide out a branch NOT checked out in any worktree",
},
{
label: "Show worktree list",
description: "See which branches have worktrees",
},
],
},
],
});
To slide out a branch with an active worktree:
git worktree remove <path>git machete slide-out <branch>git branch -d <branch>Safe slide-out in worktree (for non-worktree branches):
# Use --no-rebase if children are in separate worktrees (they'll update themselves)
git machete slide-out <branch> --no-rebase
# Or with local branch deletion (only if no worktree)
git machete slide-out <branch> --delete --no-rebase
If in MAIN checkout (not a worktree):
Standard flow:
git machete statusgit machete slide-out <branch> --no-rebase # For remote merges
git machete slide-out <branch> --delete # Also delete local
git machete traverse -W -y -H<worktree_considerations>
When using worktrees for stacked branches:
--no-rebase since child worktrees will run git machete update themselvesgit machete update && git push --force-with-lease</worktree_considerations>