Show the files changed in a git commit

While the git log command by itself is good enough to the commit hash and see the commit message, sometimes it helps to see which files were modfied as part of a commit. You can get that by running

git log --stat

You can also trim this result to the latest ‘n’ commits using the usual flag as shown in the example

git log --stat -<n>

Just replace ‘n’ wth a number of your choice.

If you want to see it for only a single commit, pass in the commit SHA

git log --stat commitSHA

Ryan Sukale

Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.

You may also like...

Leave a Reply

Your email address will not be published.