{"id":"682b3688-d4df-4956-b32b-7fbb55dbdf1c","task":"Compare diffs between two branches or commits with git diff","domain":"git-scm.com","steps":["Working tree vs index (unstaged changes): `git diff`.","Staged changes vs HEAD: `git diff --cached` (a.k.a. --staged).","Between two branches/commits: `git diff main feature`.","Changes on feature relative to the common ancestor of main: `git diff main...feature` (three dots).","Summary only: `git diff --stat main feature` or `--shortstat` or `--numstat`.","Only changed filenames: `git diff --name-only main feature`; machine-friendly with `-z` NUL separators."],"gotchas":["Two-dot `A..B` and three-dot `A...B` have DIFFERENT meanings: A..B = both endpoints, A...B = against the merge-base of A and B.","`git diff` with no args compares the working tree to the INDEX, not HEAD — for HEAD comparison use `git diff HEAD`.","--cached compares index to HEAD (what you've staged for the next commit).","For merge commits, `git diff A A^@` or `git show A` shows the combined diff against all parents."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T17:29:59.157Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T17:29:59.157Z"},"url":"https://mcp.waymark.network/r/682b3688-d4df-4956-b32b-7fbb55dbdf1c"}