Diff Review
The diff review workflow lets you approve or reject individual hunks within a file — enabling selective staging of exactly the changes you want to commit.
Review Panel
The review panel shows the diff for a file broken into discrete hunks. Each hunk represents a contiguous block of changes (additions, deletions, or modifications). Every hunk has its own status indicator:
○— Pending — not yet reviewed✓— Approved — will be staged✗— Rejected — will be discarded
Navigate between hunks and set their status to build up exactly the change set you want.
Hunk Actions
| Key | Action |
|---|---|
| n | Jump to next hunk |
| N | Jump to previous hunk |
| a | Approve the current hunk |
| x | Reject the current hunk |
| r | Reset hunk to pending |
| Enter | Apply — stage approved hunks, discard rejected |
| Esc | Cancel review without applying changes |
Selective Staging
This workflow is designed for situations where a file contains multiple unrelated changes and you want to commit them separately. Instead of staging the entire file, you review each hunk and decide:
- Navigate to a modified file in the status panel
- Enter diff review mode
- Review each hunk — press a to approve or x to reject
- Press Enter to apply your decisions
- Approved hunks are staged; rejected hunks are discarded from the working tree
- Pending hunks (neither approved nor rejected) remain as unstaged changes
This gives you the same power as git add -p but with a visual
interface that shows the full context of each hunk.
Batch Actions
For files with many hunks, you can use batch actions to speed up the review:
| Key | Action |
|---|---|
| A | Approve all hunks in the current file |
| X | Reject all hunks in the current file |
| R | Reset all hunks to pending |
Review Status Bar
The status bar at the bottom of the review panel shows a summary of your progress:
- Total number of hunks in the file
- Count of approved, rejected, and pending hunks
- Current hunk position (e.g., "3 of 7")
Next Steps
- Git Diff — view diffs in inline or side-by-side mode
- Git Status & Staging — stage and unstage files
- Git Log — browse commit history