How to Get a list of the changed files in Git
The same repository and HEAD position (HEAD pointing to 93da791) that we saw in the previous post will be used. The release is also the same, which is v184.108.40.206007141445-r.
Step 1 : The following command lists all the files that have changed since the last release (v220.127.116.11007141445-r)
git diff --name-only v18.104.22.168007141445-r..HEAD
By specifying --name-only, Git will only give the paths of the files that were changed by the commits in the range specified as output.
Step 2 : The output of the command can be further filtered: If we only want to show which files have been deleted in the repository since the last commit, we can use the --diff-filter switch with git diff:
git diff --name-only --diff-filter=D v22.214.171.124909041048-rc1..HEAD
There are also switches for the files that have been added (A), copied (C), deleted (D), modified (M), renamed (R), and so on