Skip to content

commit-graph Git Command Guide

The git commit-graph command manages Git commit graph files which store commit relationships and metadata to improve performance of commands like git log and git status.

Terminal window
git commit-graph write [<options>] [--stdin-packs|--stdin-commits]
git commit-graph verify [<options>]
git commit-graph read [<options>]
OptionDescription
—progressForce progress reporting
—appendInclude all commits in the commit graph file
—no-appendCreate a new file without appending
—reachableInclude reachable commits from current branch tips
—stdin-packsRead pack indices from standard input
—stdin-commitsRead commits from standard input
—max-new-filters Specify maximum number of new Bloom filters
—no-max-new-filtersDisable max-new-filters limit
—no-pruneDisable packed garbage collection
—split[=]Enable commit-graph splitting
—size-multiple Chain size multiple
—no-size-multipleDisable size multiples
—expire-time Expire files older than
—max-commits Maximum number of commits in each file
—blob-noneDo not use Bloom filters
—coalesceUse existing commit-graph file to fill commit list
—helpDisplay help
ParameterDescription
writeCreates or updates the commit graph file
verifyVerifies the commit graph file
readPrints information about the commit graph file
Terminal window
git commit-graph write

Creates a commit graph file with all reachable commits.

Terminal window
git commit-graph verify

Checks if the commit graph file is valid and consistent.

Terminal window
git commit-graph read

Displays details about the current commit graph file.

Terminal window
git commit-graph write --progress

Creates commit graph with progress output.

Terminal window
git commit-graph write --append

Adds new commits to existing commit graph without rewriting.

Terminal window
git commit-graph write --coalesce

Utilizes previous commit graph to optimize new graph creation.

Terminal window
git commit-graph verify --progress

Performs thorough verification of commit graph with progress.

To create a Git commit graph file, use:

Terminal window
git commit-graph write

To verify the commit graph file, run:

Terminal window
git commit-graph verify

To read commit graph information, execute:

Terminal window
git commit-graph read

How can I append to an existing commit graph?

Section titled “How can I append to an existing commit graph?”

To append to an existing commit graph, use:

Terminal window
git commit-graph write --append

To enable commit graph globally, run:

Terminal window
git config --global core.commitGraph true

Applications of the git commit-graph command

Section titled “Applications of the git commit-graph command”
  1. Improving performance of Git operations in large repositories
  2. Optimizing commit history traversal and lookup
  3. Reducing time for git log and related commands
  4. Supporting large-scale development workflows
  5. Enhancing CI/CD pipeline efficiency in monorepos
  6. Managing repository performance in enterprise environments