git-coauthor

Add co-author attribution to the last commit

TLDR

Add a coauthor to the last commit
$ git coauthor "[Name]" "[[email protected]]"
Add a second coauthor (run again against the same commit)
$ git coauthor "[Name2]" "[[email protected]]"

SYNOPSIS

git coauthor name email

DESCRIPTION

git coauthor is a git-extras command that amends the last commit message to add a Co-authored-by: trailer, the format GitHub and GitLab recognize to credit multiple contributors on one commit.It takes exactly one name and one email per invocation. To credit several people, run the command once per coauthor: since it appends to any Co-authored-by: trailers already present rather than replacing them, running it repeatedly against the same commit stacks up multiple coauthors.This supports pair programming, mob programming, and collaborative workflows where attribution should reflect everyone who contributed, not just whoever typed git commit.

PARAMETERS

NAME

Coauthor's name. Required.
EMAIL
Coauthor's email. Required.

INSTALL

sudo apt install git
sudo dnf install git
sudo pacman -S git
sudo apk add git
sudo zypper install git
brew install git
nix profile install nixpkgs#git

CAVEATS

Part of the git-extras package. Amends the last commit, which rewrites its hash, so avoid using it on commits already pushed to a shared branch. Both name and email are required; the command has no flags and does not validate its arguments. Coauthor emails must match the contributor's platform account for GitHub/GitLab to link the attribution to a profile.

HISTORY

git coauthor is part of git-extras, the community-maintained collection of Git utility scripts, added to support GitHub's co-author trailer convention for attributing collaborative work.

SEE ALSO

git-commit(1), git-authors(1), git-extras(1)

RESOURCES

Source code · Documentation