Git

git diff

SafeShow diff

git diff [--staged]

Shows changes; --staged shows what's staged.

Examples

  • git diff --stagedDiff of staged changes

Syntax

git diff [--staged] [<file>]

Before you run it

Read-only.

Used when you see

Merge conflict
2
Inspect conflict markers and resolve
See the whole flow →

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store