I understand that git diff compares a staged file and modified but not staged file.
But what files does git diff –staged(or –cached) compare?
A staged file and a committed file?
What are the differences between git diff and git diff –staged?
I am a bit confused.
Thanks in advance.
Here’s a handy graphic
I talk about it in more detail here.