Git Reflog
git_reflogView reflog history to track branch updates and recover lost commits. Review when HEAD and references were modified to undo changes.
Instructions
View the reference logs (reflog) to track when branch tips and other references were updated. Useful for recovering lost commits.
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_reflog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. | . |
| ref | No | Show reflog for specific reference (default: HEAD). | |
| maxCount | No | Maximum number of items to return (1-1000). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Indicates if the operation was successful. | |
| ref | Yes | The reference that was queried. | |
| entries | Yes | Array of reflog entries in reverse chronological order. | |
| totalEntries | Yes | Total number of reflog entries. |