git-info
Display information about a Git repository
TLDR
Display remote locations, remote and local branches, most recent commit data and .git/config settings
Display remote locations, remote and local branches and most recent commit data
SYNOPSIS
git info [options] [path]
While some custom implementations may accept options like --verbose or a specific path, most common versions of git-info are designed to operate without any arguments, summarizing the current repository.
DESCRIPTION
git-info is not a standard command distributed with Git. Instead, it is a commonly user-defined alias or a custom shell script designed to provide a quick, consolidated overview of the current Git repository. Its typical output includes information such as the current branch, the last commit details (hash, author, message, date), the remote origin URL, and a summary of the working directory's state (e.g., number of untracked, modified, or staged files, and stashes). The exact features and output format can vary widely depending on the specific script or alias implementation used by an individual or team. It serves as a convenient utility for developers to quickly grasp the essential context of their repository without running multiple git commands.
CAVEATS
The behavior and output of git-info are entirely dependent on its specific implementation, as it is a custom script or alias rather than a core Git command. Users should be aware that git-info on one system may function differently or provide different information than on another. There is no official man page or standard for its options or output.
COMMON OUTPUT
Typical output for git-info often includes:
Current branch name
Last commit hash and message
Author and date of the last commit
Remote origin URL (e.g., GitHub, GitLab)
Summary of changes in the working directory (untracked, modified, staged files)
Number of stashed changes
USAGE AS AN ALIAS
Many users implement git-info as a Git alias in their ~/.gitconfig file. For example:
[alias]
info = !sh -c 'some_script_that_gets_repo_info'
or simply map it to a locally installed script executable in their PATH named git-info.
HISTORY
The concept of git-info emerged from the Git community's desire for a single, convenient command to quickly inspect the state of a repository. As Git gained widespread adoption, developers often found themselves running a series of commands (like git status, git branch, git remote -v) to get a full picture. This led to the creation of numerous personal scripts and aliases, collectively known as git-info, to automate this process. Its development is decentralized, driven by individual user needs rather than a formal project.
SEE ALSO
git-status(1), git-log(1), git-branch(1), git-remote(1)