Team git commit cleaner
First reaction: wow this is scary: Python script generating Bash which again calls some Bash in it. But I see the filter-env technique comes straight out from an example in the docs.

I would have written this in pure Bash, using a helper function that takes as parameters:


author name
author email
one or more bad email addresses


And then for each bad email address, call git filter-branch like you did,
but all in pure Bash.

As far as the Python part is concerned, this can be done better:


emails_string = ""
for email in dev["emails"]:
    emails_string += '"%s" ' % email



Using a list comprehension:

emails_string = " ".join(['"%s"' % email for email in dev["emails"]])


With this, you don't need to .strip() the emails_string when you generate the command string.