Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List all developers on a project in Git

Tags:

git

Is it possible to list all users that contributed to a project (users that have done commits) in Git?

Any additional statistics?

like image 605
Ritam Nemira Avatar asked Mar 07 '12 07:03

Ritam Nemira


People also ask

What is the code to retrieve all the users in git?

The answer is "/users/:user/repo", but I have all the code that does this in an open-source project that you can use to stand up a web-application on a server.

What is git Shortlog?

The git shortlog command is a special version of git log intended for creating release announcements. It groups each commit by author and displays the first line of each commit message. This is an easy way to see who's been working on what.

How do I see a git project?

You can inspect a Git repository by using the git status command. This command allows you to see which changes have been staged, which haven't, and which files aren't being tracked by Git. You should try and remember that status output does not show you any information regarding the committed project history.

What is the command to see all git in local repository?

The git log command shows a list of all the commits made to a repository. You can see the hash of each Git commit, the message associated with each commit, and more metadata. This command is useful for displaying the history of a repository.


2 Answers

To show all users & emails, and the number of commits in the CURRENT branch:

git shortlog --summary --numbered --email 

Or simply:

git shortlog -sne 

To show users from all branches (not only the ones in the current branch) you have to add --all flag:

git shortlog -sne --all 
like image 64
Pedro Nascimento Avatar answered Sep 23 '22 18:09

Pedro Nascimento


If you want to be more specific in the list (find a list of unique committer and author), you could use git log:

git log --pretty="%an %ae%n%cn %ce" | sort | uniq 
  • %an author name
  • %ae author email
  • %n new line
  • %cn committer name
  • %ce committer email

Other placeholders are described in the pretty print documentation of git log.

like image 37
Guillaume Vincent Avatar answered Sep 22 '22 18:09

Guillaume Vincent