Before you commit, you want to see exactly what changed. git diff is your magnifying glass — it highlights every line added, removed, or modified.
git diff shows
you a line-by-line comparison between the old and new versions of your files.
+ Green lines are additions — new stuff.
- Red lines are deletions — removed stuff.
White lines are unchanged context.
Can you read the diff and spot what changed?
You've learned to spot the differences in code.
Red lines are gone, green lines are new — it's that simple.
Always read the diff before you commit.
It's your last chance to catch mistakes.
Review your diffs before every commit. It takes 10 seconds and saves you from committing debugging prints and typos.