How do I log unique authors in git?
I needed to get the authors and committers so below is the https://devhints.io/git-log to helpful commands.
code below gets you the author name (%an) and author email (%ae)
in this format
personName - [email protected]
git log --format="%an - %ae" | sort -u
git log --format="%cn - %ce" | sort -u
Here's one easy way:
git log --format="%an" | sort -u
Try out this one:
git shortlog -s | awk '{print $2,$3}' | sort -fu
Edit: This will get you the emails as well
git shortlog -se | sed -re 's/^\s*[[:digit:]]*\s*//' | sort -fu
or, on macOS without the -r
flag - highlighted by Oliver in comments below - would be:
git shortlog -se | sed -e 's/^\s*[[:digit:]]*\s*//' | sort -fu