Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 539 Bytes

git-diff.md

File metadata and controls

35 lines (29 loc) · 539 Bytes

Git Diff

The git diff command shows changes between commits, branches, or the working directory.

Usage

git diff

Explanation

  • Displays line-by-line changes in files.

  • Use git diff --staged to see changes in the staging area.

Example

git diff
git diff --staged

Output

λ git diff
diff --git a/git-init.md b/git-init.md
index 1dcdc1e..d34ecf6 100644
--- a/git-init.md
+++ b/git-init.md
@@ -19,4 +19,7 @@ git init
 mkdir my-project
 cd my-project
 git init
+```
+```bash
+git diff