Filter git diff by type of change

You are looking for --diff-filter=M to show only files *M*odified between the two branches.

From man git-diff

--diff-filter=[ACDMRTUXB*]

Select only files that are

  • A Added
  • C Copied
  • D Deleted
  • M Modified
  • R Renamed
  • T have their type (mode) changed
  • U Unmerged
  • X Unknown
  • B have had their pairing Broken
  • * All-or-none

Any combination of the filter characters may be used.

When * (All-or-none) is added to the combination, all paths are
selected if there is any file that matches other criteria in the
comparison; if there is no file that matches other criteria, nothing
is selected.

Leave a Comment