Skip to content

Instantly share code, notes, and snippets.

@chetbox
Last active August 23, 2016 09:14
Show Gist options
  • Save chetbox/347713e5c5a628b9bd6f to your computer and use it in GitHub Desktop.
Save chetbox/347713e5c5a628b9bd6f to your computer and use it in GitHub Desktop.
Find author names and email addresses from a git repo
#!/bin/bash
set -e
DIR=/tmp/find-git-authors
rm -rf "$DIR"
mkdir -p "$DIR"
git clone --bare "$1" "$DIR" 2> /dev/null
cd "$DIR"
git log --format=format:"%an <%ae>" HEAD | sort | uniq -i
cd ..
rm -rf "$DIR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment