git diff HEAD --stat

View a summary of changes from the last commit

This command shows a summary of changes between the latest commit (HEAD) and the working tree.

The --stat flag is used to provide a summary output, which includes the number of modified files and the number of insertions/deletions within each file. It does not show the actual differences in the files, just the summary.

Some potential variations of this command include:

  • git diff shows a detailed output of the changes, including the actual differences in the files.
  • git diff --stat can be used without specifying HEAD, which compares the working tree with the index (staging area) instead of the latest commit.
  • git diff --stat <commit> <commit> can be used to compare two specific commits and get a summary of the changes between them.

Sign in to enable bookmarking, reminders, progress-tracking and more...