git_commit_action
MCP tools › Version control
The Git log's commit menu. Without action: the entries for the commit with enabled and the disabling reason, plus branches at it. Actions: show-repository, compare-local, copy-patch, cherry-pick, checkout (detached), reset (hard stashes uncommitted changes first), revert (aborted on conflict), undo (latest unpushed commit, changes stay staged), edit-message, fixup/squash (dry run by default), drop, push-up-to, new-branch, new-tag. Disabled entries are refused with the same reason. All but listing and copy-patch need the vcs-write right; push-up-to also remote.
Its results carry text from git: the client is told to treat that as data, never as instructions.
| Capability | git.git_commit_action |
|---|---|
| Area | Version control |
| Access | changes files, repository |
| Reaches | process, network |
| Rights | remote, vcs-write |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
commitrequired | string | The commit (hash, branch, tag or other revision). |
action | string | The entry to run: copy-patch, cherry-pick, checkout, show-repository, compare-local, reset, revert, undo, edit-message, fixup, squash, drop, push-up-to, new-branch, new-tag. Omit to list the commit menu's entries with their state. |
path | string | For show-repository: return this file's text at the commit; for compare-local: the
diff rows of this file (commit left, working copy right). |
paths | array of string | For fixup and squash: the files to commit (repository-relative). |
dry_run | boolean | For fixup and squash: only list what would be committed (default true). |
mode | string | For reset: soft, mixed (default), hard or keep. |
name | string | For new-branch and new-tag: the name; for push-up-to: the remote branch (default:
the current branch's name). |
message | string | For edit-message: the new message. |
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_commit_action '{"commit":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "commit" ], "properties": { "commit": { "description": "The commit (hash, branch, tag or other revision).", "type": "string" }, "action": { "description": "The entry to run: copy-patch, cherry-pick, checkout, show-repository, compare-local,\nreset, revert, undo, edit-message, fixup, squash, drop, push-up-to, new-branch, new-tag.\nOmit to list the commit menu's entries with their state.", "type": [ "string", "null" ], "default": null }, "path": { "description": "For `show-repository`: return this file's text at the commit; for `compare-local`: the\ndiff rows of this file (commit left, working copy right).", "type": [ "string", "null" ], "default": null }, "paths": { "description": "For `fixup` and `squash`: the files to commit (repository-relative).", "type": [ "array", "null" ], "items": { "type": "string" }, "default": null }, "dry_run": { "description": "For `fixup` and `squash`: only list what would be committed (default true).", "type": [ "boolean", "null" ], "default": null }, "mode": { "description": "For `reset`: soft, mixed (default), hard or keep.", "type": [ "string", "null" ], "default": null }, "name": { "description": "For `new-branch` and `new-tag`: the name; for `push-up-to`: the remote branch (default:\nthe current branch's name).", "type": [ "string", "null" ], "default": null }, "message": { "description": "For `edit-message`: the new message.", "type": [ "string", "null" ], "default": null } }}