LinuxCommandLibrary

git-authors

List Git repository contributors

TLDR

Print a full list of committers to stdout instead of to the AUTHORS file

$ git authors [[-l|--list]]
copy

Append the list of committers to the AUTHORS file and open it in the default editor
$ git authors
copy

Append the list of committers, excluding emails, to the AUTHORS file and open it in the default editor
$ git authors --no-email
copy

SYNOPSIS

git-authors [options]

PARAMETERS

--help
    Display usage information and exit.

--version
    Print version number and exit.

--mailmap
    Honor .mailmap file for canonical author names/emails.

--raw
    Use raw author strings from commits, ignoring mailmap.

--sort FIELD
    Sort output by FIELD (e.g., author.commits, committer.date.iso).

DESCRIPTION

The git-authors command is a utility script, not part of core Git, used to parse a repository's commit history and produce a formatted list of contributors. It aggregates commits by author name and email, counts contributions, and outputs in a style suitable for an AUTHORS file or summary report.

Invoked from a Git repository root, it leverages git log --format internally, respects .mailmap for normalizing author identities, and supports sorting by commit count or other fields. Common in open-source projects to automate crediting developers without manual maintenance.

Output typically includes author names, emails, commit counts, and optionally commit summaries. Implementations vary (Bash, Perl), but core functionality remains consistent across versions from tools like git-extras (git authors) or standalone scripts on GitHub.

CAVEATS

Not a core Git command; install via git-extras, npm (git-authors-cli), or script download. Requires a Git repository. Output varies by implementation; test in your env.

EXAMPLE USAGE

git-authors > AUTHORS
git-authors --mailmap --sort author.commits
git-authors --raw

INSTALLATION

Via git-extras: sudo apt install git-extras (uses git authors).
npm: npm install -g git-authors-cli.

HISTORY

Emerged in early 2010s as helper scripts (e.g., Tim Pope's Perl version) for automating AUTHORS files. Evolved with git-extras (2012+) including git authors; now multiple forks/packages like skywinder/git-authors-cli.

SEE ALSO

git shortlog(1), git log(1), git blame(1)

Copied to clipboard