What is the command to show the contributors to a repository?
Posted by TinaGrn
Last Updated: June 06, 2024
To show the contributors to a Git repository, you can use the following command in your terminal:
git shortlog -sn
This command will provide a summary of contributions, showing the number of commits made by each contributor. If you want to include more detailed information, you can use:
git log --format='%aN' | sort -u
This will list all the unique authors of the commits. Additionally, if you are interested in a visual representation of contributors, you can use the command:
git log --format='%aN' | sort | uniq -c | sort -r
This will give you a list sorted by the number of commits for each author. For more comprehensive insights about contributions, you can also use tools like git stats or git-credits. There are also web-based tools like GitHub that can generate a contributions graph and list of contributors directly from their interface if your repository is hosted there.