View changes

git diff

This command shows the changes between the working directory and the staging area. It displays the differences line by line for each file that has been modified but not yet staged. The output is displayed in a unified diff format, which shows the removed lines with a '-' prefix and added lines with a '+' prefix.

To view the changes between the staging area and the last commit, you can use the following command:

git diff --staged