I would like to git log --follow file.ext but showing all commits, including merges.
Tried no-max-parents, but not helping.
The
-mwill do the trick for you,log -mis for get into the merges.
git log -m --oneline --full-history --follow file.ext
This should follow the file in the Merges [-m].
And i assume you was aiming to use --min-parents=2 instead of no-max-parents. The --min-parents=2 is the same as --merged since it will return the commit with more then one parent.
You can always add some extra flags to display the results in a more friendly way:
git log -m --name-only --oneline --follow file.ext. It will display the results with the SHA-1 of the commits as well with the message
-m adds a lot more merges than would be "natural". For example, git log file.ext shows 10 normal commits and 2 merge commits for me, git log --follow -m file.ext lists 10 normal commits and 30 (!!) merge commits.
Jun 11, 2019 at 20:01
--simplify-merges may be meant to help this: "Additional option to --full-history to remove some needless merges from the resulting history, as there are no selected commits contributing to this merge."
Aug 9, 2019 at 20:03