3 ms·
I have the following aliases in ~/.gitconfig: [alias] log0 = log --first-parent -m show0 = show --first-parent -m blame0 = blame --
by geofft 11y ago
I have the following aliases in ~/.gitconfig:
[alias]
log0 = log --first-parent -m
show0 = show --first-parent -m
blame0 = blame --first-parent -m
These aliases treat history as if each merge commit introduced the changes directly, and didn't have the individual history. (Even for one-patch PRs, this means that the log/blame view will point me to a commit with a link to the pull request, which means I can see any discussion of the PR.) For instance, `git show` on a merge commit will typically show no output (unless there was a merge conflict), but `git show0` will show all changes introduced by the branch being merged in, as if they had all been squashed down.
My experience is that I've really appreciated projects with a policy of mandatory merge commits (e.g. Rust; every commit is tested and merged by the CI bot, and humans only push to master in emergencies) with these in place.