git-extras
Extend Git with useful extra utilities
TLDR
Install or upgrade git-extras commands
Display help
Display version
SYNOPSIS
git <subcommand> [options] [arguments]
(Note: git-extras is a collection of Git utilities; its commands are invoked directly as git <subcommand> rather than via a single 'git-extras' command itself.)
PARAMETERS
The git-extras package extends Git by adding numerous new subcommands. Each subcommand has its own specific options and arguments. Below are a few examples of popular subcommands provided by git-extras:
git info
Displays comprehensive information about the current Git repository.
git undo
Reverts the last commit, useful for quick corrections or backing out recent changes.
git back
Undoes the last N commits by resetting the branch to a previous state, similar to 'git reset'.
git summary
Shows a compact summary of the current repository, including branches, tags, and commit counts.
git release
Creates a release commit and corresponding tag, simplifying software release management workflows.
git clean-branches
Deletes all local branches that have already been merged into the current branch or its upstream.
git pull-request
Automates the creation of a pull request on platforms like GitHub or GitLab directly from the command line.
DESCRIPTION
git-extras is an open-source collection of over 80 useful Git utilities that significantly enhance the core Git functionality. It provides commands for common Git tasks that are not included in the standard Git distribution, simplifying complex operations and improving developer productivity. These commands cover a wide range of functionalities, from repository information (e.g., git info, git summary) to history manipulation (e.g., git undo, git back), repository cleaning (e.g., git clean-branches), and various shortcuts. By installing git-extras, users gain access to a powerful set of tools that seamlessly integrate with the existing Git command-line interface, allowing them to invoke new commands directly via git <subcommand>. It's a community-driven project aimed at making common, often repetitive, Git workflows more efficient and less error-prone, offering a more robust and streamlined Git experience.
CAVEATS
git-extras is not part of the official Git distribution and requires separate installation. While it integrates seamlessly with Git, there's a minor potential for command name clashes if you have custom Git aliases or scripts with identical names. Users should also be aware that some commands might have specific dependencies or platform-specific behaviors (e.g., git pull-request often relies on GitHub or GitLab APIs).
INSTALLATION
git-extras can be easily installed using various package managers on different operating systems, such as Homebrew on macOS, apt-get on Debian/Ubuntu, or yum on Fedora/RHEL. Alternatively, it can be installed by cloning its GitHub repository and running the provided installation script, making it accessible across a wide range of environments.
COMMAND STRUCTURE
Each utility within git-extras is implemented as an independent shell script (or occasionally other language scripts) that adheres to Git's subcommand architecture. When installed, these scripts are placed in a directory accessible by Git (typically within your PATH), allowing them to be invoked directly as git <script-name>, seamlessly mimicking core Git commands and providing a consistent user experience.
HISTORY
git-extras originated around 2011-2012, primarily initiated by TJ Holowaychuk. It rapidly grew into a large, community-maintained open-source project. Its development has consistently focused on addressing common Git workflow inefficiencies and adding utilities for frequently performed, yet cumbersome, operations not covered by core Git, evolving with the needs of developers.
SEE ALSO
git(1), git-config(1), bash(1)