3 ms·
> all you have to do is "git log --first-parent -m" What is the `-m` for? Looking at the man page it says: "-m will produce the output only if -p is given as w
by graton 4y ago
> all you have to do is "git log --first-parent -m"
What is the `-m` for? Looking at the man page it says: "-m will produce the output only if -p is given as well."
Did you mean "--max-parents=1" as a different commenter used with "--first-parent"?
- seba_dos1 4y agoYou rarely want to use `--max-parents=1` with `--first-parent` as that will hide all merge commits and merged branches entirely. `-m` is useless here, just use `git log --first-parent`.
- teraflop 4y agoThe "-m" doesn't do anything by itself, but it's there in case you want to add an option like "-p", which otherwise wouldn't show a useful diff for a merge commit. With "--first-parent -m -p", the log shows only the diff of the merge commit against its first parent, which is the same as what you would get from squashing.