Show the files that were changed in a git commit

Sometimes you just need to know which files were committed as part of a commit SHA. Depending on how much detail you want to see, you can use different variations of the command listed below. The following command shows you the file names in the last commit with the commit SHA 0193b3

git show --name-only 0193b3
git show --oneline --name-only 0193b3

The above commands also print the commit message. If you dont want the commit message either, just use

git show --oneline --pretty="format:" --name-only 0193b3

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 *