List all modified files in git merge commit – even the fast forwarded

I don’t know how to do that in the commit message. But after the merge, this will give the names of all the files affected by the merge commit:

git log -m --name-only

For only a list of filenames of the commit:

git log -m -1 --name-only --pretty="format:" <Merge SHA>

There is some white space due to the merge having two parents but that can be easily removed.

Leave a Comment

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