git show -m -1 --name-only --pretty=format: --stat --relative --first-parent commit_id
I am using above command to list all the files in a commit. It is listing all the deleted files as well.
I want to remove deleted files from my list.
Is there a way to exclude deleted files from git show command?
Or is there a way to list deleted files from a commit id?
Check first if adding the
--diff-filteroption ofgit showhelpsSo anything but "D", which would filter for deleted files.
Shorter version (since Git 1.8.5):
The lowercase "d" means: everything but deleted files.