This script looks through the git log of a repo and adds their initials to your ~/.git-authors file. This can be helpful if you use git duet a lot.
The script uses Python 3, GitPython, and PyYAML.
~ > cd git-repo
~/git-repo > ./auto_add_authors.py
aw [email protected] Anson Wang
found these unique initials
('aw', '[email protected]', 'Anson Wang')
Adding them to .git-authors
~/git-repo > cat ~/.git-authors
authors:
aw: Anson Wang
email_addresses:
aw: [email protected]
~/git-repo >
The script will never overwrite existing initials/authors in your ~/.git-authors file, so run it wherever!
- Write tests
- Python 2.7 compatibility
- Repo-aware initials
- Fuzzy match initials and combine initials and e-mails
- Generate .mailmap