The --diff-filter
argument can be applied to multiple [[git]] commands to select files that match a specific state.
A
- Added
D
- Deleted
M
- Modified
R
- Renamed
etc
This is helpful for commands like git log
and git diff
.
e.g. git log --diff-filter D
shows you all commits that have ever deleted files
e.g. git diff master --diff-filter A
shows you what files have been added in the diff between the two branches
https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---diff-filterACDMRTUXB82308203