File History
file_historyShow the full commit history of a file, including who changed it and why. Trace file evolution and find when bugs were introduced.
Instructions
Show the full commit history of a specific file — who changed it, when, how much, and why. Useful for understanding why a file looks the way it does, finding when a bug was introduced, or tracing the evolution of a module. Uses --follow to track renames. NOTE: If the server was not started inside a git repo, you MUST provide repo_path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Number of days to look back (default: 365) | |
| path | Yes | File path to analyze (e.g., "src/index.ts") | |
| limit | No | Max commits to return (default: 30, max: 100) | |
| repo_path | No | Absolute path to the git repository to analyze. Required if Claude Code was not opened in a git repo. |