Quick Actions
git diff
Description
Show changes between commits, commit and working tree, etc.
Command
git diff
Examples
Show unstaged changes
git diff
Show staged changes
git diff --cached
Show changes in file
git diff filename.txt
Compare with commit
git diff HEAD~1
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
--cached |
string | No | Show staged changes |
--name-only |
string | No | Show only file names |
--stat |
string | No | Show statistics |
<commit> |
string | No | Compare with specific commit |
Command Info
Category:
Information
Type:
Git
Views:
7
Status:
Active
Tags
diff
changes
compare