Good Code
The good version checks whitespace issues, reviews both unstaged and staged changes, and confirms which commits are about to be pushed.
Lesson 06
Inspect unstaged, staged, and committed changes before pushing so accidental files and debug edits do not leave your machine.
# Check both file content and the commits about to leave the branch.
git diff --check
git diff
git diff --staged
git log --oneline origin/main..HEAD
git push# The first real review happens after the push, which is too late.
git add .
git commit -m "final"
git pushThe good version checks whitespace issues, reviews both unstaged and staged changes, and confirms which commits are about to be pushed.
The bad version sends the final state upstream without a local review pass.