GitCredit.dev
GitCredit.dev (git-credit) attributes code contributions per author beyond GitHub's graph, seeing through squash merges to credit the original authors.
Last verified:
What is GitCredit.dev?
GitCredit.dev — git-credit is a Rust-based command-line contribution analysis tool that accurately attributes lines of code to individual authors in Git repositories. It excels at seeing through squash-merged pull requests to properly credit the original authors rather than just the merge author, giving credit where it's due with precise per-author contribution stats.
Key features include detailed contribution statistics showing commits, PRs, lines added (+), lines deleted (-), and total contributions per author. The tool supports file exclusion filters to exclude generated files, lock files, and other non-code files. It can output results as JSON, limit analysis to specific revision ranges or date ranges, and includes automatic bot filtering to exclude dependabot and automated accounts by default. GitHub API integration expands squash merges to original authors when a token is provided.
git-credit is designed for open source maintainers creating release notes and contributor documentation, teams wanting to understand contribution patterns, organizations tracking developer contributions, and anyone who wants to give proper credit to all contributors including those whose PRs were squash-merged.
GitCredit.dev pricing
Pricing model: Freemium
Completely free and open source under MIT license. No paid tiers or subscription plans. Available via Homebrew (brew install mscheltienne/tap/git-credit), cargo (cargo install git-credit), pre-built binaries from GitHub Releases, or build from source. Zero cost for all features.
GitCredit.dev pros
- Accurately attributes code across squash-merged PRs to original authors
- Precise per-author stats: commits, PRs, lines added/deleted, total
- Automatic bot filtering excludes dependabot and automated accounts by default
- File exclusion filters with --exclude flag for generated files and locks
- JSON output format (--format json) for tool integration
- Revision range filtering with --rev flag
- Date-based filtering with --since flag
- GitHub API integration expands squash merges when token provided
- Multiple installation: Homebrew, cargo install, pre-built binaries, from source
- Single Rust binary with no runtime dependencies
- Completely free MIT license open source
- Fast performance as compiled Rust CLI
- Cross-platform: Linux, macOS, Windows support
- GitHub token auto-resolved from multiple sources
- Summary shows filtered bots and expanded squash merges
GitCredit.dev cons
- Requires GitHub token for accurate squash merge attribution
- MSRV 1.88 requires relatively recent Rust installation
- GitHub API lookups slow analysis without cached token
- Automatic bot filtering may exclude wanted automated contributions
- CLI-only with no GUI interface
- 34-53MB binary larger than some minimal alternatives
- No visual themes or animations like gitcredits tool
- Git repositories only, no other VCS support
- No per-file credit breakdown feature currently
Frequently asked questions about GitCredit.dev
What is git-credit?
git-credit is a contribution analysis CLI tool that accurately attributes lines of code to individual authors in Git repositories, even across squash-merged pull requests. It provides precise per-author contribution statistics including commits, PRs, lines added, lines deleted, and total contributions.
How does git-credit handle squash-merged PRs?
git-credit uses GitHub API lookups to expand squash merges and attribute code to original authors rather than just the merge author. This requires a GitHub token from --token flag, GITHUB_TOKEN, GH_TOKEN environment variables, or gh auth CLI. Without a token, squash merges are attributed only to the merge author.
How do I install git-credit?
Install via Homebrew (brew tap mscheltienne/tap && brew install mscheltienne/tap/git-credit), cargo (cargo install git-credit), download pre-built binaries from GitHub Releases for Linux/macOS/Windows, or build from source (git clone && cargo install --path .).
Can I exclude certain files from statistics?
Yes, use --exclude flag repeatedly: --exclude '*.lock' --exclude '*.generated.*'. This filters generated files, lock files, and non-code files from contribution statistics. The flag is repeatable for multiple patterns.
How do bot filtering work?
Bot accounts identified by [bot]@ in email are excluded by default. The summary line shows how many bots were filtered. Use --bots flag to include bots like dependabot and pre-commit-ci in output. Bot filtering helps focus on human contributor statistics.
Can I limit analysis to recent commits only?
Yes. Use --rev HEAD~50..HEAD to limit to last 50 commits. Use --since 2025-01-01 to include only commits after a specific date. These filters help focus analysis on relevant time periods.
What output formats are available?
Default output is a formatted table showing Author, Contributions, PRs, +, -, Total columns. Use --format json for JSON output suitable for integration with scripts and other tools.
Is a GitHub token required?
No, but without a token squash-merged PRs are attributed only to merge author. Without token, git-credit runs in --no-github mode automatically with warning. Use --no-github to skip API lookups for faster analysis when squash merge accuracy isn't needed.
What platforms are supported?
Pre-built binaries available for Linux, macOS (Intel/Apple Silicon), and Windows (x86_64). Homebrew works on macOS and Linux. Rust binary has no runtime dependencies once built.
Is git-credit free to use?
Yes, git-credit is completely free under MIT license. No paid tiers, subscriptions, or hidden costs. All features available without payment. Available through package managers and GitHub Releases at zero cost.