Reputation: 2991
I found this command, for listing all authors that contributed to a repository here:
git log --format='%aN' | sort -u
How can I find all authors that committed to a specific git branch? My goal is to have a readme.md in my repository that includes all authors that have committed to the master branch.
Upvotes: 0
Views: 342
Reputation: 8237
git log --format='%aN' <branchname> | sort -u
By default, you didn't specify the branchname, so it defaulted to HEAD, which points to your current branch. Just specify your branch name in this command to get what you want for each branch. Keep in mind that this will go from the branchName all the way back to the first commit, which may not be what you want (if the branch of interest was branched off some other branch, you might just want the branchPoint..branchName, to get the contributors for the new changes on that branch).
Upvotes: 2