The Git & Github Bootcamp Part 3- Master on essentials and the tricky bits: rebasing, squashing, stashing, reflogs, blobs, trees, & more!
Comparing Changes with Git Diff
1. Introducing The Git Diff Command
git diff
shows the differences between various commits, the staging area, and the working directory. It’s particularly useful for seeing what has changed in your code before committing.
2. A Guide To Reading Diffs
A diff output shows additions and deletions between two states. Additions are prefixed with a +
and highlighted in green, while deletions are prefixed with a -
and highlighted in red.