git log -p

Show the commit log with its diff

By using the -p flag (for "patch"), this command displays the actual changes made in each commit, allowing you to review the differences introduced by each commit in detail.

Possible variations include:

  • Using the --stat flag instead of -p to display detailed statistics about the changes introduced in each commit.
  • Adding the --graph flag to include an ASCII art representation of the commit history graph and the branch names.
  • Using the --pretty=format flag to customize the log output format in various ways, such as specifying placeholders for commit details.
  • Specifying a limit to the number of commits displayed, using the -n or --max-count flag followed by the desired number of commits to show.

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