The git diff Command

Learn about git diff and its variations.

Variations of the git diff command

The git diff command is used to see the differences between any two stages. The following is a list of stages that can be compared using git diff:

  • We can see the difference between the working environment and the staging area—that is, the difference between unstaged changes and staged changes.

    $ git diff
    
  • We can see ...