Introduction
git-extras adds over 80 supplementary commands to git, filling gaps in the standard toolset. Created by TJ Holowaychuk, it bundles utilities for common tasks like generating changelogs, counting contributions, managing branches, and inspecting repository history without writing custom scripts.
What git-extras Does
- Provides
git summaryto display contributor stats, commit counts, and project age at a glance - Adds
git changelogto auto-generate release notes from commit messages - Includes
git delete-merged-branchesto clean up stale local branches after merging - Offers
git effortto show file churn so you can spot hotspots in the codebase - Supplies
git squash,git undo,git setup, and dozens more productivity shortcuts
Architecture Overview
git-extras is a set of standalone shell scripts and man pages installed into the git exec path. Each command is a self-contained script that calls standard git plumbing commands. There is no background process or configuration database. Installation simply places the scripts where git can find them as subcommands.
Self-Hosting & Configuration
- Install via Homebrew, apt, dnf, or build from source with
make install - Scripts land in the git exec directory so they are available as
git <command>immediately - No per-repo configuration required; works with any repository
- Individual commands can be removed or overridden by placing custom scripts earlier in PATH
- Man pages are installed alongside the scripts for
git help <command>support
Key Features
- Works out of the box with zero configuration on any git repository
- Each command is a single script with no inter-dependencies
- Includes
git ignoreto manage .gitignore entries from the command line git authorsgenerates an AUTHORS file from the commit loggit forkclones and sets up a remote for contributing to open-source projects
Comparison with Similar Tools
- Git built-in aliases — custom aliases cover simple shortcuts but lack the logic git-extras commands provide
- hub / gh CLI — focused on GitHub-specific operations; git-extras works with any remote
- git-flow — provides a specific branching workflow; git-extras is a grab-bag of general-purpose utilities
- custom shell scripts — git-extras replaces the need to write and maintain your own helpers
FAQ
Q: Do I need all 80+ commands? A: No. Each command is independent. You can remove or ignore any that you do not need.
Q: Does git-extras modify my repository?
A: Only when you explicitly run a command that changes state (like git squash). Read-only commands like git summary are safe to run anytime.
Q: Can I add my own commands?
A: Yes. Drop any executable named git-mycommand in your PATH and git will find it as git mycommand.
Q: Does it work on Windows? A: Yes, via Git Bash, WSL, or MSYS2. Native Windows support depends on the shell environment.