git_revert
Revert a commit by creating a new commit that undoes it, safely fixing published changes without rewriting history. Optionally apply changes without committing.
Instructions
Revert a commit by creating a new commit that undoes it, or apply the undo without committing (no_commit=True). Use this to safely undo a published commit without rewriting history, when other people may already have the commit. Does NOT move HEAD backwards or discard history — use git_reset for that; use git_cherry_pick to re-apply a commit instead of undoing it. Best for: safely undoing a published commit without rewriting history. Returns: confirmation with the new revert commit hash.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commit | Yes | Commit to revert | |
| no_commit | No | Apply changes without committing | |
| repo_path | No | Path to the git repository, defaults to '.' (the server working directory) | . |