git hash-object -w path/to/fileGit Internals and Plumbing
Low-level Git objects, refs, trees, index, commit creation, and packfile plumbing for advanced users and debugging.
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
Objects and Content Plumbing
Inspect commits, trees, blobs, and object metadata.
bashANYplumbingobjects
bash
bashANYplumbingobjects
bash
printf "hello
" | git hash-object -w --stdinbashANYplumbingobjects
bash
git cat-file -t <object_sha>bashANYplumbingobjects
bash
git cat-file -s <object_sha>bashANYplumbingobjects
bash
git cat-file -p <object_sha>bashANYplumbingobjectsstorage
bash
git count-objects -vHTrees and Index Plumbing
Index manipulation and tree construction commands.
bashANYplumbingindex
bash
git ls-filesbashANYplumbingindex
bash
git ls-files --stagebashANYplumbingindexperformance
bash
git update-index --assume-unchanged path/to/filebashANYplumbingindexsparse
bash
git update-index --skip-worktree path/to/filebashANYplumbingtree
bash
git write-treebashANYplumbingtreeindex
bash
git read-tree HEADRefs and Symbolic Refs
Inspect and mutate refs directly.
bashANYplumbingrefs
bash
git show-refbashANYplumbingrefs
bash
git for-each-ref --format='%(refname:short) %(objectname:short)' refs/headsbashANYplumbingrefs
bash
git update-ref refs/heads/tmp <commit_sha>bashANYplumbingrefssymbolic-ref
bash
git symbolic-ref HEADbashANYplumbingrefsstorage
bash
git pack-refs --all --pruneCommit and History Plumbing
Low-level commit creation and enumeration.
bashANYplumbingcommit
bash
echo "commit message" | git commit-tree <tree_sha> -p <parent_sha>bashANYplumbinghistory
bash
git rev-list HEADbashANYplumbinghistoryobjects
bash
git rev-list --objects HEADbashANYplumbingdiff
bash
git diff-tree --stat HEAD~1 HEADbashANYplumbingrevision
bash
git rev-parse --verify HEAD^{commit}Transfer and Packfile Plumbing
Low-level network and pack operations often seen in advanced debugging.
bashANYplumbingpackfile
bash
git index-pack pack-123.packbashANYplumbingpackfile
bash
git verify-pack -v .git/objects/pack/pack-123.idxbashANYplumbingpackfile
bash
printf "%s
" <object_sha> | git pack-objects out/packbashANYplumbingpackfile
bash
git unpack-objects < pack-123.packMore in Git
Git Patch and Email Workflows
Patch-oriented Git workflows using format-patch, apply, am, and range-diff for mailing-list and review-based collaboration.
Git Recovery and Reflog
Git recovery patterns using reflog, ORIG_HEAD, fsck, dangling objects, and targeted reset or cherry-pick flows.
Git Hooks
Git hook locations, setup patterns, and reusable client-side hook snippets for linting, testing, policy, and automation.
Git Config Cookbook
Ready-to-use Git configuration recipes for identity, pull/push policy, aliases, tools, safety, and performance.
Git Revision Syntax
Git revision selectors, ranges, parents, symbolic refs, and object/path addressing.
Git Cheat Sheet
Comprehensive Git commands for day-to-day work, collaboration, history, releases, recovery, and advanced repository workflows.
Recommended next
Docker Swarm Cheat Sheet
DOCKER
Swarm cluster, node, service, and stack commands for container orchestration on Docker Engine.
Docker Buildx Cheat Sheet
DOCKER
Modern BuildKit and Buildx reference for multi-platform builds, cache, secrets, and remote outputs.
Dockerfile Cheat Sheet
DOCKER
High-value Dockerfile instructions, patterns, and build flags for reproducible and efficient image builds.
Docker Cheat Sheet
DOCKER
Comprehensive Docker Engine CLI reference for images, containers, networks, volumes, registries, contexts, and cleanup.