Tools · Files and code
git_ops
Changes thingsStructured git operations: status, diff, log, show, blame, branch, add, commit, checkout, stash (push/reset are disabled by default).
When to use: Prefer this over bash for git: status before and after changes, diff to review your edits, log/show/blame to understand history, add+commit to save work (commit requires a message).
Example
Run for real by scripts/tool-examples.py in a small demo project, with Haiku 5.5 where the tool calls a model. The output is exactly what the tool returned.
The call
{
"tool": "git_ops",
"arguments": {
"action": "log",
"limit": 3
}
}Real output
git log (ok): bf496c0 (HEAD -> main) Initial pricing service
Parameters
| Name | Type | Description |
|---|---|---|
| action* | string | —addblamebranchcheckoutcommitdifflogpushresetshowstashstash_list |
| paths | array | File paths (diff/add/blame/checkout) |
| message | string | Commit/stash message |
| ref | string | Branch/commit/ref (checkout/show/log) |
| staged | boolean | diff --staged |
| limit | integer | log entry count (default 15) |
* required
More in Files and code
Read, search and edit the project; run commands, code and git.