Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to count git commits per user in a date range?

Tags:

git

The command git shortlog -sne is exactly what I need, but I want to be able to specify a date range for that which isn't an option for shortlog. Is there another way to accomplish this same thing, but for a specific date range?

like image 730
Westwick Avatar asked Jul 02 '15 16:07

Westwick


People also ask

How can I see how many commits I have in git?

Show activity on this post. This gives me an exact count of commits in the current branch having its base on master. The command in Peter's answer, git rev-list --count HEAD ^develop includes many more commits, 678 vs 97 on my current project.

What is the command to view all the commits made by a specific person?

The git log command displays all of the commits in a repository's history.


1 Answers

Although git shortlog --help doesn't seem to specify it, shortlog takes the same --since, --after, --before and --until parameters that git log does. So, for example:

git shortlog -sne --since="01 Jan 2015" --before="01 Feb 2015"

Note:
This was verified on git 2.1.0 running on Fedora 21 and on git 1.8.3.1 running on RHEL 7.1. I don't have older systems at hand, but I believe these parameters were supported there for a while.

like image 58
Mureinik Avatar answered Oct 10 '22 06:10

Mureinik