Interactively select the author for the next git commit
Project description
select-git-author
A command-line tool to interactively select or add a Git author before committing. Useful when working with multiple identities (e.g., personal, work, open-source).
✨ Features
- Choose an author from a predefined list (
~/.git_authors) - Add and save a new author interactively
- Automatically sets
GIT_AUTHOR_NAMEandGIT_AUTHOR_EMAIL - Optionally sets
GIT_COMMITTER_NAMEandGIT_COMMITTER_EMAIL
📦 Installation
pip install select-git-author
🚀 Usage
commit [GIT_COMMIT_ARGS...]
Options
--author– Specify an author from the list. If not provided, will prompt.--set-commitor / --no-commitor– Also set the Git committer fields (default: true)
Example
commit -m "Update feature"
If no --author is given, you'll see an interactive menu like:
? Select Git author:
❯ Alice Dev <alice@example.com>
Bob QA <bob@example.org>
Add new author
If you choose "Add new author", it will prompt for name and email, and optionally save it.
🧠 Author Configuration
To predefine available authors, create a file at:
~/.git_authors
Format (one per line):
Alice Dev <alice@example.com>
Bob QA <bob@example.org>
📝 License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters