gx who identifies the top contributors to your repo by commit count, with smart deduplication to merge multiple git identities belonging to the same person.
Usage
Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--number | -n | 5 | Number of contributors to show |
--since | Only consider commits after this date (e.g., 6months, 2024-01-01) | ||
--no-limit | false | Remove file cap for directory analysis |
Example
git config user.email. The footer shows your exact git credentials for reference.
Identity Deduplication
Git users often have multiple identities (personal email, work email, GitHub noreply address). gx merges these using a union-find algorithm that links identities sharing any of:- Email address: exact match (case-insensitive)
- Email username: the part before
@(e.g.,kimfromkim@example.comandkim@work.com) - Author name: case-insensitive match
Kim <kim@example.com> and Kim <kim@work.com> appears as a single entry with both emails listed. The longest name is kept as the display name (usually the real full name).
More Examples
Show the top 10 contributors:How it works under the hood
How it works under the hood
- Runs
git shortlog -sne --allto gather all contributors across all branches - Parses each line into name, email, and commit count
- Applies union-find deduplication: any two entries sharing an email, email username (before @), or lowercase name get merged
- The merged entry keeps the longest name and sums all commit counts
- All unique emails are collected into the Email column
- “You” is detected by matching
git config user.emailagainst the email set - Results are sorted by commit count descending