Git Undo Last Commit
git_undo_last_commitSoft-reset the last commit, removing it while keeping all changes staged for re-commit or further edits.
Instructions
Soft-reset the last commit (git reset --soft HEAD~1): removes the commit but keeps all its changes staged. Safe — no work is lost.
Args:
repo_path (string, optional): repository path (default: server cwd)
Returns JSON: { undoneSha, message }
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "git_undo_last_commit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | No | Path to the git repository. Defaults to the server's working directory. |