Git Diff
Git Diff shows exact content changes between two Git states. It can compare working files, the index, commits, or branches.
Another example
Before committing, an engineer checks the unstaged diff, stages two files, checks the staged diff, and finds a debug endpoint.
Main parts
- 01Branch or change set
- 02Review and verification gate
- 03Released result
Use it when
Use it before staging, committing, review, merge, or deployment to check the exact scope.
Do not use it when
Do not review only file counts. Check binary and generated changes, and know whether the diff is staged.
Name used in code
git diff / git diff --staged / range diff Before you ship
Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback.
Outcome: Use Git Diff to release or recover the change safely, with a clear record. User context: Before committing, an engineer checks the unstaged diff, stages two files, checks the staged diff, and finds a debug endpoint. Delivery concept or operation: Git Diff. Why it fits: Use it before staging, committing, review, merge, or deployment to check the exact scope. Do not use it when: Do not review only file counts. Check binary and generated changes, and know whether the diff is staged. Delivery requirements: Name the code repository and target. List preconditions, changes, review and CI checks, conflict and data-loss risks, release order, and the rollback or recovery command. Repository safeguards: Keep unpublished work and a clear history. Do not run destructive steps without an explicit backup. Check the exact code diff and remote target before publishing. Acceptance criteria: Review the intended diff and pass all required checks. Keep the target version traceable. Practice failure recovery and keep published history clear. Evidence and limits (evidence boundary): It is official for that source. Other platforms or teams may use the term in another way. Unknowns to confirm: Repository, branch, team activity, release environment, approval owner, protected checks, and rollback target.
Check this request
Review the current use of Git Diff. Definition: Git Diff shows exact content changes between two Git states. It can compare working files, the index, commits, or branches. Release checks: Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.