Skip to content

Instantly share code, notes, and snippets.

@NakedFerret
NakedFerret / list-file-contributors.py
Last active March 9, 2018 17:00
Python script that queries git to list contributors to your files. Can ignore people and detect multiple username for one contributor. Outputs CSV
#!/usr/bin/env python
import subprocess
# Inspiration: https://stackoverflow.com/a/11740682
r = subprocess.check_output(['git','ls-tree','-r','--name-only','origin/master','./'])
files = r.split();
ignoredPeeps = set(['Laima Tazmin', 'Cara Warner', 'Patty Delgado', 'Matt Anderson', 'r29bot'])