Skip to content

Instantly share code, notes, and snippets.

@coliver
Created April 24, 2020 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coliver/0e6e00a94f5b01be623316555f8a25e2 to your computer and use it in GitHub Desktop.
Save coliver/0e6e00a94f5b01be623316555f8a25e2 to your computer and use it in GitHub Desktop.
git log - merges since whenever
git log --merges --first-parent master \
--pretty=format:"%h %<(10,trunc)%aN %C(white)%<(15)%ar%Creset %C(red bold)%<(15)%D%Creset %s"
Explaining each argument:
--merges: only "merge" commits (more than 1 parent);
--first-parent master: only merges applied to master. This removes the entries where someone merged master into their branches;
--pretty-format: applies the following formatting:
%h: the commit short hash;
%<(10,trunc)%aN: author name, truncated at 10 chars;
%<(15)%ar: the relative commit time, padded to 15 chars;
%<(15)%D: the tag names, also padded to 15 chars;
%s: first line of the commit message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment