Git Diff Mode
Git diff mode helps you review code changes instead of manually selecting every modified file.
What it does
PastePrompt can compare a base ref and a head ref, show the changed file list, and include diff context in a generated bundle. A ref can be a branch, tag, commit hash, or other local Git revision accepted by the repository.
Git diff mode can support workflows such as:
- Diff-only review.
- Diff plus full changed files.
- Diff plus selected dependencies.
- Sponsor fix review.
- Pull request review.
- Audit follow-up review.
Why it matters
Most review tasks are about changes: a sponsor fix, a pull request, a patch after audit feedback, or a regression introduced by a branch. Diff mode focuses the bundle on what changed while still allowing you to add surrounding files for context.
It helps you:
- Avoid missing changed files.
- Preserve exact base/head refs in the bundle.
- Review deleted and renamed files deliberately.
- Pair the diff with full file contents when needed.
- Build repeatable sponsor fix review artifacts.
How to use it
- Select a Git repository.
- Open Git diff mode.
- Enter or choose a base ref.
- Enter or choose a head ref.
- Review the changed file list.
- Decide whether the bundle should include:
- Diff only.
- Diff plus full changed files.
- Diff plus selected related files.
- Review deleted, renamed, and large files.
- Add a review prompt template.
- Enable and run the secret scanner before copy or export when the diff may include sensitive values.
Base and head
The base ref is the version you are comparing from. The head ref is the version you are reviewing.
Examples:
main...HEAD
audit-base...sponsor-fix
v1.2.0...feature/security-fix
Use the same base/head pair in your notes so another reviewer can reproduce the diff.
Changed, deleted, and renamed files
Changed files should appear in the diff list. Deleted files may appear with no head-side contents. Renamed files can be shown as renames when Git detects the relationship, but large rewrites may appear as delete plus add.
Review deleted and renamed files carefully because they can remove validations, tests, or safety checks without adding obvious replacement code.
Huge diff warnings
Large diffs can exceed model budgets and make review quality worse. PastePrompt should warn when a diff is unusually large, when individual files dominate the bundle, or when generated files appear in the changed list.
Example workflow
- Use
audit-base...sponsor-fixfor a sponsor patch. - Include the diff and full contents of changed source files.
- Add related interfaces and dependencies from the file tree.
- Apply the Sponsor Fix Review template.
- Ask the LLM to compare the patch against the original issue and identify remaining edge cases.
- Verify every model conclusion manually against the diff and full files.
Limitations
- Diff mode depends on local Git data. Missing refs, shallow clones, submodules, or corrupted Git state can block comparison.
- Huge diffs may need to be split into multiple bundles.
- Rename detection is Git-dependent and may not match your mental model of the change.
- Diff-only review can miss behavior that depends on unchanged code.
- Including full changed files improves context but increases token usage.