Land a finished branch: fast-forward, remove worktree, delete branch
rrt_git_landSafely land a Git branch in one local operation: fast-forward it onto a target, remove its worktree, and delete the branch, with checks and dry-run by default.
Instructions
Fast-forward onto to branch, remove the branch's worktree, and delete it.
One call, one process: three separate git calls cannot do this safely, because a hook can re-dirty the worktree between them. All checks run before any change. Local only — never pushes. Re-running after a failure skips finished steps. restore_generated discards [tool.rrt.git].generated changes in the worktree first. dry_run=True by default.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"branch": "<branch>"
},
"name": "rrt_git_land"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| onto | No | main | |
| branch | Yes | ||
| dry_run | No | ||
| keep_branch | No | ||
| restore_generated | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| onto | Yes | ||
| error | No | ||
| notes | No | ||
| steps | No | ||
| branch | Yes | ||
| landed | No | ||
| details | No | ||
| dry_run | Yes | ||
| worktree | No | ||
| cwd_removed | No | ||
| branches_after | No | ||
| branches_before | No | ||
| worktrees_after | No | ||
| worktrees_before | No |