I am looking to print a single list of all users that committed on a branch since it was created from the master (or even as far back as master creation)
I've looked at git log and I don't see such an option.
Even if I was to use git log, I just want to print an entire list without having to tab through it so that I can output it to a file.
What is the best way to achieve this?
Thanks
To show a list of all committers you can use this command
$ git shortlog -sn
Output will be similar to
42 DJ180
1 Tim Castelijns
Naturally this first lists the number of commits and then the person who committed. In this case I made 1 commit and you made 42
To list only the committers of the commits in the current master branch:
$ git shortlog -sn master
To list only the committers of the branch branchname
since it branched off of master:
$ git shortlog -sn master..branchname
This one makes use of the so called revision range:
<revision range>
Show only commits in the specified revision range. When no is specified, it defaults to HEAD (i.e. the whole history leading to the current commit). origin..HEAD specifies all the commits reachable from the current commit (i.e. HEAD), but not from origin.
More info at http://git-scm.com/docs/git-shortlog
That shows you can for example add a -e
parameter to include the email addresses of the committers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With