Introduction
Sometimes you change files but haven't saved those changes to your project history yet. You need a way to see exactly what you changed before saving. The git diff command shows the differences between your current files and the last saved version.
When you want to review what you changed in a file before saving those changes.
When you accidentally modified a file and want to see what was changed.
When you want to check which lines you added or removed in your working files.
When you want to compare your current files to the last saved snapshot in git.
When you want to prepare what to save by seeing the exact changes.