How to git diff only for modified files

While doing some diagnostic work today to determine changes within a big directory of code across two versions, I wanted to remove the noise to see only the modified files in a git diff. After a quick search around, I found myself in the Git documentation scrolling through command options.

And there I found it, a flag --diff-filter.

To diff some changes but only show modified files, use

Or to just remove added and deleted files, to keep changes like rename or unmerged, the lowercase works as an inverted filter; a == !A.

--

--

https://yannev.es

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store