13

As an admin, I would like to find out how many commits are done per branch, per user, total commits by a user in last 3 months, total commits in last 3 months. etc.. How can I do this ?

I could see this on Github like this: List commit by user

I want to see the same thing for GitLab also.

I am running Gitlab CE version: 7.2.1

I thought of running git log --author='userid' but this will take forever to run for so many user / so many branches. Same would apply for running Gitstats because I have to sync all the branches locally first.

Any pointers please?

Community
  • 1
  • 1
Raghuveer
  • 1,413
  • 3
  • 23
  • 39

1 Answers1

16

Gitstats is good to get html reports. It internally runs the git commands that you can easily change in its source to get your own kind of report.

On another note, I don't think git log should take long. You can try this sample and confirm how long it takes

git log --date=short --branches --since=3.months.ago --author=xyz

Running without using --author will give all the commits pushed in last three months.

A list of authors can be used in a single command , it should be separated by a |

Additionally you can use --pretty option to print information in desired format. You can play around with pretty format option as it is rich in offering various formats.

You can also chose this to run on list of specific branches by having them in a iteration loop. Git is very fast in getting this information.

Gaurav Tiwari
  • 362
  • 2
  • 7