Git command to show files changed in a commit

How to see exactly which files have changed in a single commit

Recently I wanted to pull a list of changed files from an older commit from the command line.

Turns out (like most things in Git) this is very easy to do.

git show --name-only {commit}

You can replace {commit} with the SHA1 you want to retrieve, or things like HEAD or HEAD^^

I made this post into a YouTube video

Recent posts View all

Web Dev

Check in with your database

It pays to take a step back and look at how your database is set up every so often. You will often find quick wins and hidden tech debt.

Web Dev Productivity

Keeping on top of website updates

Learn what website updates are, what they entail, why they are important, and how we can help