Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to know a total commit of a collaborator

Tags:

git

github

I'd like to know how many contribution of my collaborator. So I need know how many code write by himself and push to github. However, in github, there are also merge message will disturb me.

Is there a way in github or in git that I can know a collaborator actually commit code in a certain time? ( in every branch )

update Can I see the diff of non-duplicated commit of this collaborator? ie. some other person's commit will also show in merge commit.

like image 425
hey mike Avatar asked Feb 18 '23 15:02

hey mike


2 Answers

git shortlog is the tool you're looking for. Use:

git shortlog -s

to get the summary of commits by user.

like image 127
Yuval Adam Avatar answered Feb 22 '23 03:02

Yuval Adam


Github actually does this for you in the Graphs section of the repository. Both the "Contributors" and "Impact" tabs include #commits, +lines/-lines for all non-merge commits.

Edit: just realized you wanted data for all branches, Github's graphs only report on the master branch. I don't know of any way to get all branch information from Github.

like image 33
Andy Avatar answered Feb 22 '23 04:02

Andy