Get a list of changed files and their status for a specific Git commit
问题 I use the following Git command git diff-tree --no-commit-id --name-only -r <SHA> to get a list of changed files. Unfortunately, the list doesn't specify the type of change for each file: added, modified or deleted ... etc How may I display a list of changes [type of change, file name] in a given SHA of a specific commit. 回答1: Use --name-status instead of --name-only git diff-tree --no-commit-id --name-status -r <SHA> This will show the filename with a status letter of (extracted from man):