git how to see which files are changed in the last commit code example Example: files changed in a commit git diff --name-only HEAD HEAD~1