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?
You can search through your projects from the top bar, by selecting Menu > Projects. On the field Filter by name, type the project or group name you want to find, and GitLab filters them for you as you type.
Under the activity tab , there should be a subtab just for 'commits' that lists all commits to the project as they are happening. Or under the repository tab, and commits subtab, users should be able to choose 'all' under the branch drop down. Drag your designs here or click to upload.
Select respective group and project from the dropdown. Enter the text to be searched and click on 'Search' button.
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.
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