Filter git diff by type of change

You are looking for --diff-filter=M to show only files Modified 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.

Also, these upper-case letters can be downcased to exclude. E.g. --diff-filter=ad excludes added and deleted paths.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)