Skip to content

Instantly share code, notes, and snippets.

@afeld
Last active August 29, 2015 14:11
Show Gist options
  • Save afeld/017862706282c10edb6e to your computer and use it in GitHub Desktop.
Save afeld/017862706282c10edb6e to your computer and use it in GitHub Desktop.
list contributors to a Git repository
require 'rugged'
repo = Rugged::Repository.new('.')
walker = Rugged::Walker.new(repo)
walker.push('refs/heads/gh-pages')
emails = walker.map do |commit|
commit.author[:email]
end
emails.reject! do |email|
email.end_with?('@users.noreply.github.com')
end
puts emails.uniq!.sort!
@afeld
Copy link
Author

afeld commented Dec 13, 2014

One-liner from @aroben:

git log --format=%ae BRANCH | grep -v '@users\.noreply\.github\.com' | sort -u

https://twitter.com/aroben/status/543547456076926976?cn=cmVwbHk%3D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment