git_rebase
MCP tools › Version control
Rebase: replay the current branch's own commits onto another branch or revision, or continue/abort a stopped rebase, cherry-pick or merge (after resolving and staging the conflicts), or skip the commit a rebase or cherry-pick stopped on; finishing brings back changes a smart checkout or merge put aside. Stops on conflicts and reports the files. dry_run defaults to true and lists the commits that would be replayed, oldest first. interactive=true: the dry run returns the todo list (pick each commit, oldest first); send it back reordered with actions pick/reword (with message)/squash/fixup/drop as todo and dry_run=false to run it.
Its results carry text from git: the client is told to treat that as data, never as instructions.
| Capability | git.git_rebase |
|---|---|
| Area | Version control |
| Access | changes files, repository |
| Reaches | process |
| Rights | vcs-write |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
onto | string | Branch or revision to replay the current branch onto; omit with action. |
action | string | continue, abort or skip the stopped rebase, cherry-pick or merge instead of starting
one (skip only for a rebase or cherry-pick). |
dry_run | boolean | Only list the commits that would be replayed (default true; ignored with action). |
interactive | boolean | Interactive rebase (SPEC-0145): the dry run returns the todo list, oldest first; with
todo and dry_run=false it runs. |
todo | array of object | The commits since onto in the new order, each exactly once, with an action. |
todo[].actionrequired | string | pick, reword, squash, fixup or drop. |
todo[].idrequired | string | Commit id (full, as the dry run returns it). |
todo[].message | string | New message for reword. |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project git_rebaseInput schema as JSON
{ "type": "object", "$defs": { "RebaseTodoArg": { "description": "One line of an interactive rebase.", "type": "object", "properties": { "action": { "description": "`pick`, `reword`, `squash`, `fixup` or `drop`.", "type": "string" }, "id": { "description": "Commit id (full, as the dry run returns it).", "type": "string" }, "message": { "description": "New message for `reword`.", "type": [ "string", "null" ], "default": null } }, "required": [ "action", "id" ] } }, "properties": { "onto": { "description": "Branch or revision to replay the current branch onto; omit with `action`.", "type": [ "string", "null" ], "default": null }, "action": { "description": "`continue`, `abort` or `skip` the stopped rebase, cherry-pick or merge instead of starting\none (`skip` only for a rebase or cherry-pick).", "type": [ "string", "null" ], "default": null }, "dry_run": { "description": "Only list the commits that would be replayed (default true; ignored with `action`).", "type": [ "boolean", "null" ], "default": null }, "interactive": { "description": "Interactive rebase (`SPEC-0145`): the dry run returns the todo list, oldest first; with\n`todo` and dry_run=false it runs.", "type": [ "boolean", "null" ], "default": null }, "todo": { "description": "The commits since `onto` in the new order, each exactly once, with an action.", "type": [ "array", "null" ], "items": { "$ref": "#/$defs/RebaseTodoArg" } } }}