Skip to main content

Git Add Co-Author

Demo

git-add-co-author

Overview

Git Add Co-Author is a simple Python script that allows you to easily add co-authors to your Git commits, ensuring proper credit is given to all contributors involved in the development process. This can be particularly useful for open-source projects, where multiple contributors are working together, or for pair programming sessions where two developers contribute to the same commit.

Installation

  1. Install the package using pip:
pip install git-add-co-author
  1. Obtain a personal access token from GitHub. You can generate one by following the instructions in the GitHub documentation.

  2. Configure the script with your GitHub token:

python -m git_add_co_author --token <your_token>

Usage

To add a co-author to your commit, simply run the script with the co-author's GitHub username:

python -m git_add_co_author --username <co_author_username>

For example:

python -m git_add_co_author sansyrox

If you do not want to authorize a token, you can add the co-author's name and email address directly:

python -m git_add_co_author --name "John Doe" --email "john.doe@example.com"

Optional Configuration

I alias this command as alias gac="python -m git_add_co_author --username" in my .zshrc file, so I can simply run gac <co_author_username> to add a co-author to my commit.

Rationale

The motivation behind creating this script is to provide an easy way to give credit to contributors in various situations:

  • In open-source projects, when a pull request (PR) is closed without merging but the idea or code is later implemented.
  • During pair programming sessions, where two or more developers work together on a single commit.

Existing solutions were either too complicated or didn't work as expected, so Git Add Co-Author was developed as a simple, easy-to-use alternative.

License

This project is licensed under the MIT License.

Metadata

Release files for git-add-co-author 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-add-co-author 0.4.2
File Size Uploaded
git_add_co_author-0.4.2.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for git-add-co-author 0.4.2
File Interpreter ABI Platform
git_add_co_author-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 kB

Release files / git_add_co_author-0.4.2.tar.gz

Download URL git_add_co_author-0.4.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
967ace8702e021e1394b04238e08cd3843db6a18d818300b7e5837fa5eb7d99d
BLAKE2b-256 checksum
How to use checksums
55c7b3729bcbc369cd969138953c543924d0b9dcc142419ce8dc46142749e28e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.7 Darwin/21.6.0

Release files / git_add_co_author-0.4.2-py3-none-any.whl

Download URL git_add_co_author-0.4.2-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb8cb056041c7062d30f930b4d29b4b582ebc8c3bd3b8b83eb793bd35fc668ca
BLAKE2b-256 checksum
How to use checksums
1e739d0b6e533b279614a3509dd76ae125dbc2dd6dc35949d5627cffc6e72f5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.7 Darwin/21.6.0

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page