Alison Monteiro
BlogServicesAbout

List your git authors via command line

If you are working on a project and need to release often, you might need some automated scripts/commands to help you with the day-to-day tasks.

This tiny article is about one of these commands: List your git project contributors.

Give credit to people

When working on an open-source project, it's important to give credit to all the people who contribute to it.

To get the list of authors, we can run:

git log --all --format="%aN" | sort -u

Remember to add | sort -u to your log command. If you don't do it, the output will show the same author a bunch of times. Unless you want that, add the sort command to your pipe.

If you want to add the e-mails to the list, you can run:

git log --all --format="%aN <%aE>" | sort -u
Share:
Buy Me A Coffee