Git Archaeologist is a VS Code extension that explains why code exists and what changed between branches by mining local git evidence and using GitHub Copilot to generate archaeology timelines and branch impact reports.
Key Features
- Chat participant: @gitarch
- Investigate selected code or current file from Command Palette or editor context menu
- Branch impact analysis between source and target branches
- Compare current branch to a target branch
- Optional test coverage signal analysis in branch impact reports
- Evidence-first reasoning with local git context
- Styled report webview for readable output
- Cached report commands (last archaeology report and last branch impact report)
- Raw evidence commands for transparency (archaeology and branch diff evidence)
- Configurable context limits for selected lines and commits
What It Collects
For archaeology investigations (selected code or current file):
git blamefor selected lines- file history and line history
- ranked commit messages, commit details, and focused diff snippets
- working tree diff summary (
git diff --stat, file names, and trimmed diff context) - related test file candidates and decision signals inferred from commit text/diffs
For branch impact analysis:
- changed files between source and target branches (status and category)
- branch commit summaries and prioritized file diff snippets
- merge-base aware diff context with safety truncation for large diffs
- optional test coverage signals based on changed production files and related tests in the workspace
- impact context signals (API/DTO/config/dependency/reference hints) from changed files
This extension uses local, read-only git commands and workspace files.
Commands
- GitArch: Investigate Selected Code
- GitArch: Investigate Current File
- GitArch: Show Last Archaeology Report
- GitArch: Show Raw Git Evidence
- GitArch: Compare Branches
- GitArch: Compare Current Branch to Target
- GitArch: Show Last Branch Impact Report
- GitArch: Show Raw Branch Diff Evidence
Quick Start
- Install the extension.
- Open any git repository in VS Code.
- Open the Command Palette:
- macOS:
Cmd+Shift+P - Windows:
Ctrl+Shift+P
- macOS:
- Type
GitArchand choose a command, for example:GitArch: Investigate Selected CodeGitArch: Investigate Current FileGitArch: Compare Branches
- (Optional) Select code in the editor, right-click, and run
GitArch: Investigate Selected Codefrom the context menu. - Or ask in Copilot Chat:
@gitarch why does this code exist?@gitarch compare current branch to main and tell me impact
GitHub Copilot Requirement
Git Archaeologist uses GitHub Copilot and the VS Code Language Model APIs to generate archaeology and branch impact reasoning.
To get the full benefits of this extension, sign in to GitHub Copilot in VS Code and ensure Copilot Chat is available in your environment.