Show the files that were changed in a git commit

Some­times you just need to know which files were com­mit­ted as part of a com­mit SHA. Depend­ing on how much detail you want to see, you can use dif­fer­ent vari­a­tions of the com­mand listed below. The fol­low­ing com­mand shows you the file names in the last com­mit with the com­mit SHA 0193b3

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

The above com­mands also print the com­mit mes­sage. If you dont want the com­mit mes­sage 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 *