What command shows the number of commits that each contributor has made to a repository?
Posted by LeoRobs
Last Updated: July 05, 2024
To see the number of commits made by each contributor in a Git repository, you can use the following command in your terminal:
git shortlog -sn
Here’s what this command does: - git shortlog: This command summarizes the git log output. - -s: This flag shows only the commit counts rather than the commit messages. - -n: This flag sorts the output by the number of commits, with the highest number first. When you run this command in your repository, it will display a list of contributors along with the number of commits each has made.
Related Content