3 ms·
I think you can do that if you merge with --no-ff, then use git log --first-parent. Only the merge commit will appear on the list, hiding the commits from the m
by icebraining 10y ago
I think you can do that if you merge with --no-ff, then use git log --first-parent. Only the merge commit will appear on the list, hiding the commits from the merged branch.
- herge 10y agoDoes git blame let you see the same thing? I don't see --first-parent as an argument to it. It's only helpful if the 'un-expanded' commit is used through the whole system, from git blame, to rebases, etc.
- mglover 10y agoI have used git blame with --first-parent to get the 'un-expanded' commit identifier in the blame view. I'm rather new to the --first-parent flag myself but I think it works with anything that supports revision options. Here's what I see in git 2.8.1: usage: git blame [<options>] [<rev-opts>] [<rev>] [--] <file> <rev-opts> are documented in git-rev-list(1) And --first-parent is listed as an option here: https://www.git-scm.com/docs/git-rev-list https://www.git-scm.com/docs/git-rev-list