Skip to main content
Plumbing interrogator commands are low-level Git commands that query and inspect Git’s internal data structures. These commands provide detailed information about objects, refs, and repository state.

git-cat-file

Provide content or type and size information for repository objects

git-cherry

Find commits yet to be applied to upstream

git-diff-files

Compare files in the working tree and the index

git-diff-index

Compare a tree to the working tree or index

git-diff-pairs

Show changed files between two trees

git-diff-tree

Compare the content and mode of blobs found via two tree objects

git-for-each-ref

Output information on each ref

git-for-each-repo

Run a Git command on a list of repositories

git-get-tar-commit-id

Extract commit ID from an archive created using git-archive

git-last-modified

Show last modification time for files

git-ls-files

Show information about files in the index and the working tree

git-ls-remote

List references in a remote repository

git-ls-tree

List the contents of a tree object

git-merge-base

Find as good common ancestors as possible for a merge

git-name-rev

Find symbolic names for given revs

git-pack-redundant

Find redundant pack files

git-repo

Query repository information

git-rev-list

List commit objects in reverse chronological order

git-rev-parse

Pick out and massage parameters

git-show-index

Show packed archive index

git-show-ref

List references in a local repository

git-unpack-file

Create a temporary file with a blob’s contents

git-var

Show a Git logical variable

git-verify-pack

Validate packed Git archive files

Overview

Plumbing interrogators provide detailed queries into Git’s internals:
  • Object inspection - Examine blobs, trees, commits, and tags
  • Diff operations - Low-level comparison of Git objects
  • Reference queries - List and inspect refs and branches
  • Repository analysis - Query repository structure and state
These commands are primarily intended for use in scripts and by Git porcelain commands. Most users should use the higher-level info commands instead.