I have a big project with many authors.
For example,
user1 - commit1
user2 - commit2
user1 - commit3
I want to get all unique authors. The result must be user1 user2
How do I log unique authors in git?
Git Log Oneline The oneline option is used to display the output as one commit per line. It also shows the output in brief like the first seven characters of the commit SHA and the commit message.
So for looking for commits by “Adam Dymitruk” it's easier to just type git log --author="Adam" or use the last name if there more contributors with the same first name.
The command for that would be git log –oneline -n where n represents the number up to which commit you to want to see the logs.
The --graph flag enables you to view your git log as a graph. To make things things interesting, you can combine this command with --oneline option you learned from above. One of the benefit of using this command is that it enables you to get a overview of how commits have merged and how the git history was created.
Here's one easy way:
git log --format="%an" | sort -u
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With