Show the files changed in a git commit

While the git log com­mand by itself is good enough to the com­mit hash and see the com­mit mes­sage, some­times it helps to see which files were mod­fied as part of a com­mit. You can get that by running

git log --stat

You can also trim this result to the lat­est ‘n’ com­mits using the usual flag as shown in the example

git log --stat -<n>

Just replace ‘n’ wth a num­ber of your choice.

If you want to see it for only a sin­gle com­mit, pass in the com­mit SHA

git log --stat commitSHA

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. Required fields are marked *