Git Atlas
Git
▼
2.43
20 Nov 2023
Filter
Zoom
100%
Toggle theme (current: light)
Git feature atlas
Git feature atlas
git-atlas-v1 · 17 areas · 222 features
70 core
91 common
61 advanced
TIER
core: needed for any repository
common: expected day to day
advanced: scale, hosting, rare
STATUS
covered
partial
absent
not applicable
not surveyed
ARROWS
feeds: a selected dependency
Foundations: Hashing, compression, configuration and the naming rules that every other area builds on.
Foundations
18
OBJECT IDENTITY
Object IDs & hex [oid, core] Fixed-width binary object IDs (20 or 32 bytes), lowercase hex encoding and parsing, the null OID, ordering and prefix comparison.
Object IDs & hex
SHA-1 hashing [sha1, core] SHA-1 over arbitrary-length streamed input, used for object IDs and for pack/index trailers in SHA-1 repositories.
SHA-1 hashing
SHA-1 collision detection [sha1-collision-detection, advanced] SHA1DC-style detection of known collision attacks: a colliding input is rejected rather than hashed silently.
SHA-1 collision detection
SHA-256 object format [sha256, advanced] Repositories with `extensions.objectFormat=sha256`: 32-byte IDs through objects, packs, index, refs and the wire `object-format` capability.
SHA-256 object format
Mixed-hash interoperability [hash-interop, advanced] `extensions.compatObjectFormat`: a bidirectional SHA-1/SHA-256 mapping with on-the-fly object conversion. Incomplete even upstream.
Mixed-hash interoperability
COMPRESSION
zlib inflate [zlib-inflate, core] Decode zlib-framed DEFLATE (stored, fixed and dynamic Huffman blocks), verify Adler-32, stream input of unknown compressed length and report bytes consumed (needed to walk pack entries).
zlib inflate
zlib deflate [zlib-deflate, core] Produce zlib streams any inflater accepts. Output need not be byte-identical to zlib's, since object IDs cover uncompressed content.
zlib deflate
CONFIGURATION
Config file syntax [config-syntax, core] Sections, subsections, case rules, quoting and escapes, line continuation, comments, valueless keys and multi-valued keys; edits preserve unrelated formatting and comments.
Config file syntax
Typed config values [config-types, core] Value interpretation: booleans, integers with k/m/g suffixes, bool-or-int, paths with `~` expansion and `:(optional)`, colors, expiry dates.
Typed config values
Config scopes & precedence [config-scopes, core] system, global (including XDG), local, worktree and command scopes (`-c`, `GIT_CONFIG_COUNT`, `GIT_CONFIG_GLOBAL/SYSTEM/NOSYSTEM`), last-one-wins and multi-value accumulation across them.
Config scopes & precedence
Config includes [config-includes, common] `include.path` and `includeIf` with `gitdir:`, `gitdir/i:`, `onbranch:` and `hasconfig:remote.*.url:` conditions, relative-path resolution and cycle limits.
Config includes
IDENTITY & TIME
Author & committer identity [ident, core] Resolve identity from `GIT_AUTHOR_*`/`GIT_COMMITTER_*`, `author.*`/`committer.*`/`user.*` config, `EMAIL` and system fallbacks; strip crud characters; refuse empty names where git does (`user.useConfigOnly`).
Author & committer identity
Date parsing & formatting [dates, common] The internal `<epoch> <tz>` form, RFC 2822 and ISO 8601 input, approxidate (`2.weeks.ago`, `yesterday noon`), and the `--date=` output formats including relative and strftime.
Date parsing & formatting
NAMES & PATTERNS
Ref name validation [refname-rules, core] The check-ref-format rules: no `..`, control characters, `~^:?*[\`, `@{`, trailing `.lock` or `.`, empty components; one-level and refspec-pattern variants; `--normalize`.
Ref name validation
Tree path safety [path-safety, core] Refuse unsafe paths entering the index or worktree: `.git` and its HFS+/NTFS-equivalent spellings, `..`, empty components, absolute paths, symlinked `.gitmodules`, and writing through symlinked leading directories.
Tree path safety
Path quoting [path-quoting, common] C-style quoting of unusual path bytes in output (`core.quotePath`), and NUL-terminated `-z` alternatives that never quote.
Path quoting
Wildmatch globbing [wildmatch, core] Git's glob engine: `*`, `?`, bracket and POSIX classes, `**` directory semantics in pathname mode, and case folding.
Wildmatch globbing
Pathspec matching [pathspec, common] Pathspecs with magic: `:(top)`, `literal`, `glob`, `icase`, `exclude` (`:!`), `attr:`; prefix handling from subdirectories; `--pathspec-from-file`.
Pathspec matching
Object model: The four object types, their canonical byte encodings, and well-formedness rules.
Object model
7
OBJECT CODECS
Object framing & blobs [object-header, core] `<type> <size>\0<content>` framing; the ID is the hash of exactly those bytes. Blobs are opaque content.
Object framing & blobs
Tree objects [tree-codec, core] Entries of octal mode, name and raw OID; modes 100644, 100755, 120000, 40000 and 160000; canonical ordering where directories sort as `name/`; no duplicate names.
Tree objects
Commit objects [commit-codec, core] `tree`, ordered `parent`s, `author`, `committer`, optional `encoding`, `gpgsig`, `mergetag` and unknown headers with continuation lines, then the message verbatim. Parse-then-serialize is byte-identical.
Commit objects
Annotated tag objects [tag-codec, core] `object`, `type`, `tag`, optional `tagger`, message with optional trailing signature; tags of tags, trees and blobs; mktag's strict validation.
Annotated tag objects
Commit message encoding [message-encoding, advanced] The `encoding` header, `i18n.commitEncoding` on write and re-encoding to `i18n.logOutputEncoding` on display.
Commit message encoding
Embedded signature format [signature-embedding, common] Where signatures live and what payload they cover: the `gpgsig`/`gpgsig-sha256` commit header, the tag trailer, `mergetag`; extracting payload and signature without altering bytes.
Embedded signature format
OBJECT VALIDATION
Object well-formedness checks [fsck-objects, common] git's fsck message catalog (`badTree`, `treeNotSorted`, `zeroPaddedFilemode`, `missingEmail`, `gitmodulesName`, ...), their default severities and `fsck.<id>` / `fsck.skipList` overrides.
Object well-formedness checks
Object storage: Where objects live on disk: loose files, packfiles and the lookup layers above them.
Object storage
16
OBJECT DATABASE
Loose objects [loose-objects, core] `objects/xx/<rest>` zlib files: read, and write via temp file + rename, read-only permissions, no rewrite of existing objects (mtime freshened instead).
Loose objects
Lookup & abbreviation [object-lookup, core] One lookup over loose, packed and alternate sources; unique-prefix resolution, ambiguity errors with type-aware disambiguation (`core.disambiguate`, `^{commit}`), and auto-sized abbreviations (`core.abbrev`).
Lookup & abbreviation
Alternate object stores [alternates, common] `objects/info/alternates` (relative and absolute, recursive with depth limit) and `GIT_ALTERNATE_OBJECT_DIRECTORIES`; alternates are read-only.
Alternate object stores
Replace refs & grafts [replace-refs, advanced] `refs/replace/<oid>` transparently substitutes objects on read unless disabled (`GIT_NO_REPLACE_OBJECTS`, `--no-replace-objects`); legacy `info/grafts` parent overrides.
Replace refs & grafts
Large object streaming [object-streaming, advanced] Objects above `core.bigFileThreshold` are hashed, stored, checked out and packed without being held in memory or deltified.
Large object streaming
PACKFILE READING
Pack file format [pack-format, core] `PACK` header, version 2, entry type/size varints, zlib payloads, trailing checksum; entry types commit, tree, blob, tag, ofs-delta, ref-delta.
Pack file format
Pack index (.idx) [pack-index, core] Version 2 (fanout, sorted OIDs, CRC-32, 31-bit offsets plus 64-bit table, trailers) and legacy version 1; binary search by OID and by prefix.
Pack index (.idx)
Delta resolution [pack-delta, core] Apply copy/insert delta instructions; resolve OFS_DELTA and REF_DELTA chains of arbitrary depth without recursion blow-up; detect cycles and bad base sizes.
Delta resolution
Pack verification [pack-verify, common] Verify the pack checksum, idx checksum, per-entry CRCs and that every object hashes to its indexed ID; report delta chain statistics.
Pack verification
PACKFILE WRITING & INGESTION
Pack indexing (index-pack) [index-pack, core] From a raw pack stream: resolve all deltas, compute IDs, write `.idx` (and `.rev`), complete thin packs with `--fix-thin`, optionally fsck objects (`--strict`), write `.keep`/`.promisor` markers.
Pack indexing (index-pack)
Unpack to loose objects [unpack-objects, common] Explode a pack stream into loose objects, as used for small fetches and pushes (`transfer.unpackLimit`).
Unpack to loose objects
Pack generation [pack-objects, core] Write a valid pack for an object set given as revisions (`--revs`) or a list on stdin, to a file with index or to stdout for transfer.
Pack generation
Delta encoding [delta-encode, common] Create a copy/insert delta between two buffers (upstream: Rabin-fingerprint index in diff-delta) and emit OFS_DELTA or REF_DELTA entries.
Delta encoding
Delta search & reuse [delta-search, advanced] Candidate ordering (type, name hash, size), `--window`/`--depth` limits, reuse of existing deltas and compressed data from source packs, `pack.*` tuning.
Delta search & reuse
Thin packs [thin-packs, common] Emit deltas against bases the receiver already has (`--thin`, from `--objects-edge` boundaries), and only when the peer asked for it.
Thin packs
Delta islands [delta-islands, advanced] Restrict delta bases to objects in the same ref-defined island (`pack.island`) so forks sharing storage can be served without cross-fork deltas.
Delta islands
References: Named pointers into the object graph: storage backends, atomic updates, logs and enumeration.
References
11
REF STORAGE
Loose refs [loose-refs, core] One file per ref under `refs/` plus `HEAD`; directory/file conflicts between names (`a` vs `a/b`), empty-directory cleanup, tolerant reading of trailing whitespace.
Loose refs
Symbolic refs & HEAD [symbolic-refs, core] `ref: <target>` files, symref chains with a depth limit, detached versus attached versus unborn `HEAD`, and updates written through a symref to its target.
Symbolic refs & HEAD
Packed refs [packed-refs, core] The `packed-refs` file: header traits (`peeled`, `fully-peeled`, `sorted`), `^` peel lines, headerless and unsorted legacy files, loose-over-packed precedence, and rewriting on delete.
Packed refs
Pseudo-refs & special refs [special-refs, common] Root refs outside `refs/`: `ORIG_HEAD`, `MERGE_HEAD`, `CHERRY_PICK_HEAD`, `REVERT_HEAD`, `BISECT_HEAD`, `AUTO_MERGE`, and the multi-line `FETCH_HEAD` format with its not-for-merge markers.
Pseudo-refs & special refs
Reftable format [reftable-format, advanced] Read reftable files: header/footer, ref, log, obj and index blocks, prefix compression, restart points, value types, and merged iteration over a stack with tombstones (`extensions.refStorage=reftable`).
Reftable format
Reftable writing & compaction [reftable-stack, advanced] Append tables atomically via `tables.list` and its lock, update indexes monotonically, auto-compact geometrically, write ref and log records; migrate between backends.
Reftable writing & compaction
REF UPDATES & LOGS
Ref transactions [ref-transactions, core] Atomic multi-ref create/update/delete/verify with expected-old-value checks, `.lock` files, all-or-nothing commit and D/F conflict detection; the `update-ref --stdin` command language.
Ref transactions
Reflogs [reflog, common] `logs/<ref>` lines of old OID, new OID, identity, timestamp and message; `core.logAllRefUpdates` rules for which refs get logs; the `HEAD` reflog; message normalization.
Reflogs
Ref enumeration & filtering [ref-iteration, core] Sorted iteration by prefix merging loose and packed refs; pattern filters; `--contains`, `--merged`, `--no-merged`, `--points-at`; hidden/excluded refs; broken-ref reporting.
Ref enumeration & filtering
Ref formatting language [ref-format, common] The `--format` atoms of for-each-ref/branch/tag: `%(refname:short)`, `%(objectname)`, `%(upstream:track)`, `%(contents:subject)`, `%(if)`...`%(end)`, `%(align)`, colors, and `--sort` keys including `version:refname`.
Ref formatting language
Ref namespaces [ref-namespaces, advanced] `GIT_NAMESPACE` / `--namespace`: serve and update `refs/namespaces/<ns>/...` as if it were the whole ref space.
Ref namespaces
Repository: Finding, creating and safely sharing a repository on disk.
Repository
9
LAYOUT & DISCOVERY
Repository creation [repo-init, core] Create the directory layout, `HEAD` (`init.defaultBranch`), initial config, optional templates; `--bare`, `--separate-git-dir`, `--shared` permissions; re-running init is safe.
Repository creation
Repository discovery [repo-discovery, core] Walk up from the cwd to find `.git` or a bare repository; honour `GIT_DIR`, `GIT_WORK_TREE`, `core.worktree`, `core.bare`, `GIT_CEILING_DIRECTORIES`, filesystem boundaries, and `GIT_OBJECT_DIRECTORY`/`GIT_INDEX_FILE`/`GIT_COMMON_DIR` overrides.
Repository discovery
Gitfiles [gitfile, common] A `.git` file containing `gitdir: <path>` (relative or absolute) redirecting to the real git directory, as used by submodules and linked worktrees.
Gitfiles
Format version & extensions [repo-format, core] `core.repositoryFormatVersion` 0/1 and `extensions.*`: refuse to operate on unknown versions or unknown extensions under v1, instead of corrupting a repository it does not understand.
Format version & extensions
Ownership & safe.directory [safe-directory, common] Refuse repositories owned by another user unless listed in protected-scope `safe.directory`; `safe.bareRepository` policy for bare repositories found by discovery.
Ownership & safe.directory
Lock files & atomic writes [lockfiles, core] The cross-process protocol: create `<file>.lock` exclusively, write, fsync per `core.fsync`, rename into place; respect locks held by others on the index, refs, config, packed-refs and shallow; clean up on failure.
Lock files & atomic writes
Shallow boundaries [shallow-boundary, common] `$GIT_DIR/shallow` lists commits whose parents are absent; all walks, fsck and pack generation treat them as parentless.
Shallow boundaries
LINKED WORKTREES
Operating in linked worktrees [worktree-layout, common] `$GIT_DIR/worktrees/<id>/` with `gitdir`, `commondir`, per-worktree `HEAD`, index and pseudo-refs; shared versus per-worktree refs (`refs/bisect`, `refs/worktree`, `main-worktree/`, `worktrees/<id>/`); `extensions.worktreeConfig`.
Operating in linked worktrees
Worktree management [worktree-manage, common] add (with branch creation, detach and the checked-out-elsewhere guard), list (`--porcelain`), remove, move, lock/unlock, prune, repair, and relative-path links.
Worktree management
Index & working tree: The staging area, its file format, and reconciliation with files on disk.
Index & working tree
21
INDEX FILE
Index version 2 [index-v2, core] Header, entries (stat data, mode, flags, path) sorted by path then stage, padding, trailing checksum (or zeros with `index.skipHash`); skip unknown optional extensions, refuse unknown mandatory ones.
Index version 2
Conflict stages [index-stages, common] Unmerged paths carried as stage 1/2/3 entries; stage 0 and higher stages are mutually exclusive per path; resolving collapses them.
Conflict stages
Index v3 extended flags [index-v3, common] The extended flag word: intent-to-add and skip-worktree bits; version chosen automatically when any entry needs it.
Index v3 extended flags
Index v4 path compression [index-v4, advanced] Prefix-compressed path names with varint strip counts and no entry padding (`index.version=4`, `feature.manyFiles`).
Index v4 path compression
Cache-tree extension [cache-tree, common] `TREE`: cached tree IDs per directory; invalidated along the path of any change, rebuilt on write-tree, never stale.
Cache-tree extension
Resolve-undo extension [resolve-undo, advanced] `REUC`: the higher-stage entries removed when a conflict was resolved, enabling `checkout -m` / `update-index --unresolve`.
Resolve-undo extension
WORKING TREE SCANNING
Stat matching & refresh [stat-refresh, core] Compare cached stat data with lstat (`core.trustctime`, `core.checkStat`, `core.fileMode`), re-hash only on mismatch, write refreshed stat data back; assume-unchanged entries are skipped.
Stat matching & refresh
Racy-git handling [racy-git, common] Entries whose mtime is not older than the index file cannot be trusted by stat alone: content is compared, and such entries are smudged (size zeroed) on write.
Racy-git handling
File modes & symlinks [filemode-symlinks, core] The executable bit and symlinks as tracked content; fallbacks when the filesystem lacks them (`core.fileMode=false`, `core.symlinks=false` checks links out as plain files).
File modes & symlinks
Case & Unicode folding filesystems [fs-quirks, advanced] `core.ignoreCase` path comparison, detection of paths that collide on checkout, and `core.precomposeUnicode` NFD/NFC handling.
Case & Unicode folding filesystems
Ignore rules [gitignore, core] Pattern syntax (negation, trailing `/`, anchoring, `**`, escapes) and source precedence: per-directory `.gitignore`, `info/exclude`, `core.excludesFile`; a file cannot be re-included if its parent directory is excluded.
Ignore rules
Untracked file walk [untracked-walk, core] Directory traversal that classifies untracked and ignored paths, collapses wholly-untracked directories, does not descend into nested repositories, and supports the `-uno/normal/all` and `--ignored` modes.
Untracked file walk
Status computation [status, core] HEAD-vs-index and index-vs-worktree changes with rename detection, unmerged paths, untracked files, branch and ahead/behind info, in-progress operation state; porcelain v1 and v2 formats.
Status computation
CHECKOUT ENGINE
Tree / index conversion [read-write-tree, core] Load one tree into the index (optionally under `--prefix`) and write the index out as trees using the cache-tree; refuse to write an unmerged index.
Tree / index conversion
Writing files to the worktree [checkout-files, core] Materialize index entries: create leading directories, set modes, create symlinks, replace files of changed type, remove deleted paths and emptied directories, update stat data afterwards.
Writing files to the worktree
Tree switching (unpack-trees) [unpack-trees, core] One-way and two-way merge of trees into index and worktree (`read-tree -m -u`, reset, checkout): carry compatible local changes, refuse to clobber dirty or untracked files, handle D/F transitions, honour skip-worktree.
Tree switching (unpack-trees)
Sparse checkout [sparse-checkout, advanced] `info/sparse-checkout` patterns in full and cone mode set skip-worktree on excluded paths; commands leave those paths alone yet keep them in commits; `set`/`add`/`reapply`/`disable`.
Sparse checkout
ATTRIBUTES & CONTENT FILTERS
Attribute lookup [gitattributes, common] `.gitattributes` syntax (set, unset, value, unspecified, macros such as `binary`), lookup order across directories, `info/attributes` and `core.attributesFile`, and reading attributes from the index or a tree (`--source`).
Attribute lookup
Line-ending conversion [eol-conversion, common] `text`, `eol`, `core.autocrlf`, `core.eol`, `core.safecrlf`, auto-detection of binary content, and renormalization.
Line-ending conversion
Clean/smudge filter drivers [filter-drivers, common] `filter.<name>.clean`/`smudge` commands and the long-running `filter.<name>.process` protocol (pkt-line handshake, capabilities, delayed smudge), plus `required`. This is the hook Git LFS uses.
Clean/smudge filter drivers
ident & working-tree-encoding [ident-encoding, advanced] `ident` expands `$Id$` on checkout and collapses it on add; `working-tree-encoding` transcodes between UTF-8 blobs and another worktree encoding with round-trip checks.
ident & working-tree-encoding
Revisions & traversal: Naming objects and walking the commit graph.
Revisions & traversal
11
REVISION SYNTAX
Name resolution [rev-names, core] Resolve full and abbreviated hex, and ref names by the DWIM order (`<name>`, `refs/<name>`, `refs/tags/`, `refs/heads/`, `refs/remotes/`, `refs/remotes/<name>/HEAD`), with ambiguity warnings and `describe`-style names.
Name resolution
Ancestry & peel operators [rev-navigation, core] `^`, `^<n>`, `~<n>`, `^{<type>}`, `^{}`, `^0`, `<rev>:<path>`, `:<stage>:<path>`, and the parent shorthands `^@`, `^!`, `^-<n>`.
Ancestry & peel operators
Reflog & upstream selectors [rev-reflog-upstream, common] `@`, `<ref>@{<n>}`, `@{<date>}`, `@{-<n>}`, `@{upstream}`/`@{u}`, `@{push}`, resolved from reflogs and branch config.
Reflog & upstream selectors
Commit message search [rev-search, advanced] `:/<regex>` (youngest matching commit reachable from any ref) and `<rev>^{/<regex>}`, including the `:/!-` negation form.
Commit message search
Ranges & revision sets [rev-ranges, core] `A..B`, `A...B`, `^A`, `--not`, `--all`, `--branches`/`--tags`/`--remotes`/`--glob` with `--exclude`, `--reflog`, `--stdin`.
Ranges & revision sets
GRAPH TRAVERSAL
Commit walk & ordering [rev-walk, core] Walk from positive tips while propagating UNINTERESTING from negative ones, robust to clock skew; default, `--topo-order`, `--date-order`, `--author-date-order`, `--reverse`, `--first-parent`; `-n`, `--skip`, `--since`, `--until`.
Commit walk & ordering
Commit filtering [rev-filters, common] `--author`/`--committer`/`--grep` with regex flags, `--merges`/`--no-merges`/`--min-parents`/`--max-parents`, `--ancestry-path`, `--boundary`, `--left-right`, and patch-equivalence filtering (`--cherry-pick`, `--cherry-mark`, `git cherry`).
Commit filtering
Path-limited history [history-simplification, common] TREESAME-based simplification for `-- <path>`: default mode, `--full-history`, `--dense`/`--sparse`, `--simplify-merges`, `--show-pulls`, parent rewriting, and `--follow` across renames.
Path-limited history
Object enumeration [object-walk, core] `rev-list --objects`: each reachable tree and blob once, with paths, excluding everything reachable from negative tips; `--objects-edge`, `--missing=<action>`, `--unpacked`.
Object enumeration
Object filters [object-filters, advanced] `--filter=` specs: `blob:none`, `blob:limit=<n>`, `tree:<depth>`, `object:type=<t>`, `sparse:oid=<blob>` and `combine:`; used by partial clone and `pack-objects`.
Object filters
Merge bases & reachability [merge-base, core] All best common ancestors (paint-down-to-common), `--octopus`, `--independent`, `--is-ancestor`, `--fork-point` from reflogs, ahead/behind counts.
Merge bases & reachability
Diff & patch: Comparing content, presenting the differences and applying them elsewhere.
Diff & patch
21
COMPARISON SOURCES
Tree-to-tree diff [tree-diff, core] Merge-walk two sorted trees producing raw records (`:<mode> <mode> <oid> <oid> <status>\t<path>`), recursive or not (`-r`, `-t`), pathspec-limited, skipping identical subtrees by OID.
Tree-to-tree diff
Index & worktree diff [index-worktree-diff, core] `diff-index` (tree vs index with `--cached`, or vs worktree) and `diff-files` (index vs worktree), including stat-dirty, unmerged, intent-to-add and deleted entries.
Index & worktree diff
Merge commit diffs [diff-merges, common] Combined diff (`-c`), dense combined (`--cc`) with multi-column hunks, per-parent diffs (`-m`, `--first-parent`), and `--remerge-diff`.
Merge commit diffs
Diff outside a repository [diff-no-index, advanced] `git diff --no-index` compares two filesystem paths or directories with the full diff machinery.
Diff outside a repository
DIFFCORE TRANSFORMS
Rename detection [rename-detection, common] Exact renames by OID, then inexact by similarity score with `-M<n>` thresholds, basename-first matching, and the `diff.renameLimit` cap with its warning.
Rename detection
Copy & break detection [copy-break-detection, advanced] `-C` and `--find-copies-harder` copy sources, `-B` breaking of total rewrites and re-merging of broken pairs.
Copy & break detection
Pickaxe search [pickaxe, common] `-S<string>` (occurrence count changed), `-G<regex>` (pattern in changed lines), `--pickaxe-all`, `--pickaxe-regex`, `--find-object=<oid>`.
Pickaxe search
Filter, order & relative [diff-filter-order, common] `--diff-filter`, `-O<orderfile>`, `--relative`, `-R`, `--rotate-to`/`--skip-to`.
Filter, order & relative
CONTENT DIFF & OUTPUT
Myers diff & hunk shaping [myers-diff, core] xdiff's Myers implementation with its cost heuristics, `--minimal`, change compaction (sliding groups) and the indent heuristic, so that hunks equal git's and not merely some valid diff.
Myers diff & hunk shaping
Patience & histogram diff [patience-histogram, common] `--diff-algorithm=patience|histogram` and `--anchored`, with `diff.algorithm` config.
Patience & histogram diff
Whitespace options [whitespace-handling, common] `-w`, `-b`, `--ignore-space-at-eol`, `--ignore-cr-at-eol`, `--ignore-blank-lines`, and `core.whitespace` error classes used by `--check` and apply.
Whitespace options
Unified patch format [unified-format, core] `diff --git` headers with `index`, mode, similarity and rename/copy lines; hunk headers with function context; `-U<n>`, `--inter-hunk-context`, `-W`; `\ No newline at end of file`; quoted paths; abbreviation of OIDs.
Unified patch format
Summary formats [diff-stat, common] `--raw`, `--name-only`, `--name-status`, `--stat` (with width scaling), `--numstat`, `--shortstat`, `--dirstat`, `--summary`.
Summary formats
Binary files & patches [binary-diff, common] Binary detection (NUL in the first 8000 bytes, or attributes), `Binary files differ`, and `--binary` patches with base85 literal and delta hunks.
Binary files & patches
Word diff & moved lines [word-diff, advanced] `--word-diff` modes with `--word-diff-regex`, `--color-words`, and `--color-moved` block detection.
Word diff & moved lines
Diff drivers & textconv [diff-drivers, advanced] The `diff` attribute: built-in and custom `xfuncname` hunk-header patterns, `textconv` with optional caching in `refs/notes/textconv`, external diff commands, per-driver `binary` and `algorithm`.
Diff drivers & textconv
PATCH APPLICATION & EXCHANGE
Patch application [apply, common] Parse git and traditional unified patches; apply to worktree, index (`--index`, `--cached`) or both; `--check`, `-R`, `-p<n>`, fuzz and offset search, `--3way` fallback, `--reject`, whitespace fixing, renames, mode changes, creations, deletions and binary hunks.
Patch application
Patch IDs [patch-id, advanced] Hash of a normalized diff (line numbers and whitespace ignored), stable and unstable variants; the basis for cherry equivalence and rebase's skip-already-applied.
Patch IDs
Patch series generation [format-patch, common] One mbox message per commit: headers, `[PATCH n/m]` numbering, MIME/encoding of non-ASCII, cover letter, threading, `--base` info, signature, attach/inline, range-diff and interdiff sections.
Patch series generation
Mailbox application [am, common] `mailsplit` (mbox, maildir), `mailinfo` (header decoding, scissors, in-body headers, charset, format=flowed), and `am` state in `rebase-apply/` with `--3way`, `--continue`, `--skip`, `--abort`.
Mailbox application
Range diff [range-diff, advanced] Pair commits of two ranges by minimum-cost assignment over diff-of-diff sizes and show a diff between their patches.
Range diff
Merge: Combining divergent content, trees and histories.
Merge
9
CONTENT MERGE
Three-way text merge [merge-file, core] xdiff's three-way merge: conflict regions and their simplification levels, `merge`/`diff3`/`zdiff3` styles, marker size and labels, `--ours`/`--theirs`/`--union` resolution.
Three-way text merge
Merge drivers [merge-drivers, advanced] The `merge` attribute: built-in `text`, `binary` and `union` drivers, custom `merge.<driver>.driver` commands with placeholders, `recursive` driver for virtual bases, `conflict-marker-size`.
Merge drivers
TREE MERGE
Trivial three-way read-tree [trivial-merge, common] The per-path case table of `read-tree -m <base> <ours> <theirs>`: resolves unchanged/one-side-changed paths in the index and leaves the rest as stages.
Trivial three-way read-tree
Tree merge with renames (ort) [merge-ort, core] The default strategy: three-way tree merge with rename detection, content merges, and every conflict class (modify/delete, add/add, rename/rename, rename/add, D/F, mode, submodule), computed in memory; results as a tree plus conflict stages and messages.
Tree merge with renames (ort)
Directory rename detection [directory-renames, advanced] Files added on one side inside a directory the other side renamed follow the rename (`merge.directoryRenames`), with its conflict and ambiguity rules.
Directory rename detection
Virtual merge bases [recursive-bases, common] With several merge bases (criss-cross), merge the bases recursively into a virtual ancestor, conflict markers included, and use it as the base.
Virtual merge bases
Strategies & strategy options [merge-strategies, advanced] `-s ours`, `octopus`, `resolve`, `subtree` and external `git-merge-<name>` strategies; `-X ours|theirs|ignore-space-change|renormalize|find-renames=<n>|subtree=<path>|diff-algorithm=`.
Strategies & strategy options
MERGE WORKFLOW
Merge command [merge, core] Already-up-to-date and fast-forward detection, `--ff-only`/`--no-ff`, `--squash`, `--no-commit`, generated merge messages (`fmt-merge-msg`), `MERGE_HEAD`/`MERGE_MSG`/`MERGE_MODE`/`AUTO_MERGE` state, `--abort`, `--continue`, refusing on dirty overlap.
Merge command
Rerere [rerere, advanced] Record conflict preimages and resolutions under `rr-cache/` keyed by a normalized conflict hash, replay them on recurrence, `forget`, `gc`, `rerere.autoUpdate`.
Rerere
Integrity & maintenance: Keeping a repository correct and compact over time.
Integrity & maintenance
9
INTEGRITY
Repository fsck [fsck, common] Verify every object's hash and format, connectivity from refs, reflogs, index and worktree HEADs; report missing, dangling and unreachable objects; check refs (`git refs verify`); `--lost-found`, `--connectivity-only`, `--name-objects`.
Repository fsck
HOUSEKEEPING
Packing refs [pack-refs, common] Write loose refs into `packed-refs` with peel data under lock, `--all`, `--prune`, `--include`/`--exclude`, `--auto`; never lose a concurrent update.
Packing refs
Repack [repack, common] Consolidate into new packs: `-a`/`-A`/`-d`, `-l` with alternates, `.keep` and `--keep-pack`, `--unpack-unreachable`, optional bitmap/MIDX writing, removing redundant packs only after the new one is in place.
Repack
Geometric repack [repack-geometric, advanced] `--geometric=<factor>`: combine only the smallest packs so pack sizes form a geometric progression, typically feeding an incremental MIDX.
Geometric repack
Cruft packs [cruft-packs, advanced] Unreachable objects collected into a cruft pack with a `.mtimes` sidecar recording per-object times, so expiry works without exploding loose objects; `--cruft-expiration`, `--max-cruft-size`.
Cruft packs
Prune [prune, common] Delete unreachable loose objects older than the expiry, where reachability includes all refs, reflogs, index entries, every worktree's HEAD and index, and recent objects' referents; remove stale temp files; `prune-packed`.
Prune
Reflog expiry [reflog-expire, common] `reflog expire` with `--expire`, `--expire-unreachable`, per-pattern `gc.<pattern>.reflogExpire*`, `--rewrite`, `--updateref`, `--stale-fix`; `reflog delete` and `drop`.
Reflog expiry
Garbage collection [gc, common] Orchestrate pack-refs, reflog expire, repack, prune, worktree prune and rerere gc; `gc.auto` loose-object and pack-count thresholds, `gc.pid` locking, background detach, `gc.log`.
Garbage collection
Background maintenance [scheduled-maintenance, advanced] `git maintenance run` tasks (gc, commit-graph, prefetch, loose-objects, incremental-repack, pack-refs, ...), strategies, `register`, and scheduler integration (cron, systemd, launchd, schtasks); `scalar`'s defaults.
Background maintenance
History inspection: Presenting and interrogating history.
History inspection
9
LOG OUTPUT
Pretty formats [pretty-formats, common] Built-in formats (oneline, short, medium, full, fuller, reference, email, raw), `--format=` placeholders with padding, truncation and color, `%(describe)`, `%(trailers)`, decorations, `--abbrev-commit`.
Pretty formats
History graph drawing [log-graph, advanced] `--graph` ASCII rendering: column allocation, merges, octopus merges, collapsing and padding lines.
History graph drawing
Mailmap [mailmap, common] `.mailmap` syntax (four mapping forms, case-insensitive matching), sources `mailmap.file`/`mailmap.blob`/worktree; applied in log (`%aN`, `%aE`), shortlog and blame.
Mailmap
Shortlog [shortlog, advanced] Group commits by author, committer or trailer with counts, summaries and wrapping; reads a revision range or log text on stdin.
Shortlog
FORENSICS
Describe & name-rev [describe, common] Nearest-tag naming (`<tag>-<n>-g<abbrev>`) with candidate limits, `--tags`, `--all`, `--long`, `--match`/`--exclude`, `--first-parent`, `--dirty`, `--contains`; `name-rev` naming relative to refs.
Describe & name-rev
Blame [blame, common] Assign each line to the commit that introduced it, passing blame through parents; `-L` ranges, `-M`/`-C` movement and copy detection, `-w`, `--ignore-rev(s-file)`, `--reverse`, `--first-parent`, uncommitted content; porcelain and incremental formats.
Blame
Line-range history [line-log, advanced] `log -L <range>:<file>` and `-L :<funcname>:<file>`: track a line range backwards through diffs, adjusting it per commit.
Line-range history
Bisect [bisect, common] State in `refs/bisect/*`, `BISECT_LOG`, `BISECT_TERMS`, `BISECT_START`; next-commit choice by maximizing min(ancestors, non-ancestors), skip handling, custom terms, `--first-parent`, `run` with its exit-code protocol, replay, reset.
Bisect
Grep [grep, common] Search worktree, index (`--cached`) or trees; basic, extended, PCRE and fixed patterns; boolean `--and`/`--or`/`--not`, `--all-match`; `-p`/`-W` function context, binary handling, pathspecs, `--recurse-submodules`.
Grep
Local workflows: The everyday operations composed from the areas above.
Local workflows
17
STAGING & FILE OPERATIONS
Staging content [add, core] Hash worktree files into blobs (after filters) and update index entries; `-u`, `-A`, pathspecs, refusal of ignored paths without `-f`, `--chmod`, `-N`, `--renormalize`, embedded-repository handling.
Staging content
Patch-mode staging [interactive-staging, advanced] Hunk-level selection for add/reset/checkout/restore/stash `-p`: split, edit, search, and applying the chosen hunks; `add -e`.
Patch-mode staging
Removing & moving paths [rm-mv, common] `rm` with its safety checks (`--cached`, `-f`, `-r`, staged-and-modified refusal) and `mv` of files and directories updating index and worktree, including submodule entries.
Removing & moving paths
Restoring paths [restore-paths, common] `restore --staged/--worktree/--source`, `checkout <tree> -- <paths>`, `reset -- <paths>`; overlay vs no-overlay, `--ours`/`--theirs`/`--merge` on conflicted paths.
Restoring paths
Cleaning untracked files [clean, common] Remove untracked files (`-d`, `-x`, `-X`, `-e`), requiring `-f` or `-n`, never descending into nested repositories without a second `-f`.
Cleaning untracked files
COMMITS, BRANCHES & TAGS
Commit creation [commit, core] Write the index as a tree, create the commit and advance `HEAD` with a reflog entry, in one step; root and merge commits; `--amend`, `--allow-empty`, `--author`/`--date`, `-a`, partial commits (`-o`/`-i` paths), message sources and cleanup modes (stripspace), templates.
Commit creation
Branch management [branch, core] Create, delete (with merged-check), rename, copy and list branches; upstream tracking config (`--track`, `branch.autoSetupMerge`), unborn branches, `--contains`/`--merged` listing, description.
Branch management
Switching branches [switch, core] Move `HEAD` and update index and worktree through unpack-trees: attach, `--detach`, `-c`/`-b`, `--orphan`, remote-branch DWIM (`--guess`), `-` for the previous branch, `-m` three-way carry of local changes, `--force`.
Switching branches
Reset modes [reset, core] `--soft`, `--mixed`, `--hard`, `--merge`, `--keep`: which of HEAD, index and worktree change and when the operation is refused; `ORIG_HEAD`.
Reset modes
Tag management [tag, common] Lightweight and annotated tag creation, `-f`, delete, list with patterns, `--contains`, `--sort` (including version sort), `-n`, message cleanup.
Tag management
Stash [stash, common] Stash commits (worktree commit with HEAD, index and optional untracked parents) on the `refs/stash` reflog; push with pathspecs, `--keep-index`, `--include-untracked`; apply/pop with `--index`; list, show, drop, clear, branch.
Stash
Notes [notes, advanced] Notes trees under `refs/notes/*` with adaptive fan-out; add, append, copy, show, remove, prune; display in log (`--notes`, `notes.displayRef`); notes merge strategies; rewrite copying (`notes.rewriteRef`).
Notes
HISTORY REWRITING
Cherry-pick & revert [cherry-pick-revert, common] Replay one commit as a three-way merge with its parent as base (reversed for revert): `-x`, `-m <parent>`, `-n`, `--ff`, empty-commit policies, `CHERRY_PICK_HEAD`/`REVERT_HEAD` and conflict state.
Cherry-pick & revert
Sequencer [sequencer, common] Multi-commit picks and reverts driven by a persisted todo list in `.git/sequencer/`: `--continue`, `--skip`, `--abort`, `--quit`, with abort-safety checks.
Sequencer
Rebase [rebase, common] Compute the commits to replay (upstream, `--onto`, `--root`, `--fork-point`, `--keep-base`), drop those already upstream by patch ID, replay with the merge backend (or the apply backend), autostash, `ORIG_HEAD`, reflog messages, state in `rebase-merge/`, continue/skip/abort.
Rebase
Interactive rebase [rebase-interactive, common] The todo language (pick, reword, edit, squash, fixup with `-C`/`-c`, exec, break, drop, label, reset, merge, update-ref), `--autosquash`, `--rebase-merges`, `--update-refs`, `--exec`, todo editing mid-run.
Interactive rebase
In-memory replay [replay, advanced] `git replay`: rebase or cherry-pick commit ranges without touching index or worktree, emitting `update-ref --stdin` commands; suitable for bare, server-side use.
In-memory replay
Wire protocol & transports: The byte-level conversation between two repositories and the channels that carry it.
Wire protocol & transports
19
FRAMING
pkt-line framing [pkt-line, core] 4-hex-digit length-prefixed packets up to 65520 bytes; flush `0000`, delimiter `0001`, response-end `0002`; optional trailing newline handling; `ERR` packets.
pkt-line framing
Sideband multiplexing [sideband, core] `side-band` and `side-band-64k`: band 1 pack data, band 2 progress, band 3 fatal error; progress line splitting and the `remote:` prefix; keepalives.
Sideband multiplexing
v0 advertisement & capabilities [ref-advertisement, core] The initial ref listing: capabilities after NUL on the first line, `symref=`, `agent=`, `object-format=`, peeled `^{}` entries, the `capabilities^{}` placeholder for empty repositories, `shallow` lines.
v0 advertisement & capabilities
FETCH PROTOCOL
Protocol v0/v1 fetch [protocol-v0-fetch, common] want/have/done exchange with `multi_ack`, `multi_ack_detailed`, `no-done`, `include-tag`, `ofs-delta`, `thin-pack`, `allow-tip-sha1-in-want`/`allow-reachable-sha1-in-want`; v1 is v0 with a version line.
Protocol v0/v1 fetch
Protocol v2 core [protocol-v2, core] Capability advertisement, then commands: `ls-refs` (`ref-prefix`, `symrefs`, `peel`, `unborn`) and `fetch` with its sectioned response (`acknowledgments`, `shallow-info`, `wanted-refs`, `packfile`); `agent`, `object-format`, `server-option`, `session-id`.
Protocol v2 core
Protocol v2 optional features [protocol-v2-extras, advanced] `ref-in-want`, `wait-for-done`, `packfile-uris`, `sideband-all`, and the `object-info`, `bundle-uri` and `promisor-remote` capabilities.
Protocol v2 optional features
Have negotiation [negotiation, common] Choosing which `have`s to send and when to stop: the `consecutive` default, `skipping` and `noop` algorithms (`fetch.negotiationAlgorithm`), `--negotiation-tip`, ACK/ready handling, and the server's common-commit tracking.
Have negotiation
Shallow negotiation [shallow-protocol, common] `shallow`, `deepen`, `deepen-since`, `deepen-not`, `deepen-relative` requests and `shallow`/`unshallow` replies, with the client updating `$GIT_DIR/shallow` atomically with the fetch.
Shallow negotiation
PUSH PROTOCOL
Push command exchange [send-pack-protocol, core] Ref update commands (`<old> <new> <ref>`) with capabilities `report-status`, `report-status-v2`, `delete-refs`, `ofs-delta`, `quiet`, `atomic`, `push-options`, `side-band-64k`, `object-format`; pack follows unless only deleting; parse per-ref `ok`/`ng <reason>`.
Push command exchange
Signed pushes [push-certificates, advanced] `push-cert=<nonce>`: a signed certificate of the ref updates sent in-band, nonce verification (`receive.certNonceSeed`, slop), exposed to hooks via `GIT_PUSH_CERT*`.
Signed pushes
TRANSPORTS
Local & file:// transport [transport-local, core] Spawn upload-pack/receive-pack on a local path or `file://` URL; the local-clone fast path that hardlinks or copies objects (`--local`, `--no-hardlinks`, `--shared`).
Local & file:// transport
Smart HTTP client [transport-http-smart, core] `GET info/refs?service=`, stateless-RPC `POST`s, content types, `Git-Protocol` header, gzip and chunked request bodies, redirects, 401 challenge to credentials, and the `http.*` settings including per-URL `http.<url>.*` matching.
Smart HTTP client
Dumb HTTP client [transport-http-dumb, advanced] Fetch from a static file server by walking `info/refs`, `objects/info/packs`, loose objects, pack indexes and `http-alternates`.
Dumb HTTP client
SSH transport [transport-ssh, common] Run the remote service over ssh: `ssh://` and scp-like syntax, ports, `GIT_SSH`/`GIT_SSH_COMMAND`/`core.sshCommand`, `ssh.variant` detection (openssh, plink, tortoiseplink, simple), `-o SendEnv=GIT_PROTOCOL`, option-injection hardening for hosts starting with `-`.
SSH transport
git:// client [transport-git, common] The anonymous TCP transport on port 9418: request line `git-upload-pack <path>\0host=<host>\0` with extra parameters for protocol version.
git:// client
Remote helpers [remote-helpers, advanced] The `git-remote-<scheme>` stdin/stdout protocol: `capabilities`, `list`, `fetch`, `push`, `import`/`export`, `connect`/`stateless-connect`, `option`; also `ext::` and `<helper>::<address>` URLs.
Remote helpers
URL parsing, rewriting & policy [url-handling, common] Parse all URL forms (scp-like, IPv6 literals, percent-encoding, `file://`), apply `url.<base>.insteadOf`/`pushInsteadOf` longest-match rewriting, enforce `protocol.allow`/`protocol.<name>.allow`, and redact credentials when displaying URLs.
URL parsing, rewriting & policy
Proxies [proxy, advanced] HTTP(S)/SOCKS proxies via `http.proxy`, `remote.<name>.proxy`, environment variables and proxy authentication; `core.gitProxy` command for git://.
Proxies
Credential helpers [credentials, common] The credential key=value protocol (`get`/`store`/`erase`, with `capability[]`, `authtype`, `password_expiry_utc`, `wwwauth[]`), helper chains from `credential.helper` with URL-scoped config, `credential.useHttpPath`, askpass and terminal prompts, the built-in `cache` and `store` helpers.
Credential helpers
Fetch, push & serving: Client workflows over the protocol, and the server side that answers them.
Fetch, push & serving
17
REMOTES & REFSPECS
Remote configuration [remotes, core] `remote.<name>.*` (url, pushurl, fetch, push, tagOpt, prune, mirror, promisor), `remote add/rename/remove/set-url/set-head/set-branches/show/prune`, remote groups, `remote.pushDefault` and `branch.<name>.pushRemote`.
Remote configuration
Refspecs [refspecs, core] Parse `[+]<src>:<dst>` with one `*` glob per side, negative `^` refspecs, exact-OID sources, empty sides and the `:` and `tag <name>` shorthands; map remote refs to local and back; detect conflicting destinations.
Refspecs
Remote ref listing [ls-remote, common] List a remote's refs without fetching: `--heads`/`--branches`, `--tags`, `--refs`, `--symref`, patterns, `--sort`, `--exit-code`; uses `ref-prefix` under v2.
Remote ref listing
FETCH & CLONE
Fetch [fetch, core] Negotiate, ingest the pack (index-pack or unpack per `fetch.unpackLimit`), check connectivity, then update remote-tracking refs with fast-forward/force rules, write `FETCH_HEAD`, auto-follow tags, `--prune`, `--tags`, `--all`/`--multiple`, `--atomic`, `--dry-run`, `--refmap`.
Fetch
Clone [clone, core] Init, configure `origin`, fetch, point `HEAD` at the remote's default branch (including unborn), check out; `--bare`, `--mirror`, `--branch`, `--single-branch`, `--no-checkout`, `--origin`, `-c`, `--reference`/`--dissociate`, `--revision`; remove the partial directory on failure.
Clone
Shallow clone & deepen [shallow-clone, common] `--depth`, `--shallow-since`, `--shallow-exclude`, later `--deepen`/`--unshallow`, fetching into and pushing from shallow repositories, `--[no-]shallow-submodules`.
Shallow clone & deepen
Partial clone & promisors [partial-clone, advanced] `--filter` clones with `extensions.partialClone` / `remote.<name>.promisor`, `.promisor` pack markers, on-demand lazy fetch of missing objects (batched), and fsck, gc, repack and connectivity checks that tolerate promised objects; `backfill`.
Partial clone & promisors
Pull [pull, common] Fetch, then integrate the for-merge entries of `FETCH_HEAD` by merge or rebase according to `pull.rebase`, `pull.ff`, `branch.<name>.rebase` and flags; refuse on divergence without a configured mode; unborn-branch pulls; autostash.
Pull
Bundle URIs [bundle-uri, advanced] Bootstrap a clone or fetch from pre-computed bundles: `--bundle-uri`, bundle lists (config-format, `all`/`any` mode), the `creationToken` heuristic, server-advertised URIs.
Bundle URIs
PUSH
Push [push, core] Resolve what to push from refspecs and `push.default` (simple, upstream, current, matching, nothing), send only missing objects, interpret the status report, update tracking refs; `--set-upstream`, `--delete`, `--tags`, `--follow-tags`, `--mirror`, `--all`, `--dry-run`, `--porcelain`.
Push
Forced & conditional pushes [push-safety, common] Client-side non-fast-forward rejection and its reasons (fetch-first, needs-force, already-exists for tags), `--force`, `+` refspecs, `--force-with-lease[=<ref>[:<expect>]]`, `--force-if-includes`, `--atomic`, `--push-option`.
Forced & conditional pushes
SERVING
upload-pack server [upload-pack, common] Serve fetches in v0 and v2: advertisement with `uploadpack.hideRefs`, want validation (`allowTipSHA1InWant`, `allowReachableSHA1InWant`, `allowAnySHA1InWant`), negotiation, pack generation with thin/ofs-delta, shallow and filter requests, keepalives, stateless-RPC mode.
upload-pack server
receive-pack server [receive-pack, common] Accept pushes: ingest into a quarantine object directory, optionally fsck (`receive.fsckObjects`), check connectivity of new tips, migrate objects, apply ref updates (atomically if asked), report per-ref status, trigger auto-gc.
receive-pack server
Receive update policies [receive-policy, common] `receive.denyNonFastForwards`, `denyDeletes`, `denyCurrentBranch` (including `updateInstead`), `denyDeleteCurrent`, `receive.hideRefs`, `maxInputSize`, `unpackLimit`, `advertisePushOptions`, `certNonceSeed`.
Receive update policies
Smart HTTP server [http-backend, advanced] The CGI-style endpoint set: `info/refs?service=`, `git-upload-pack`, `git-receive-pack`, gzip request bodies, `Content-Length`/chunked input, `Git-Protocol`, service gating (`http.receivepack`, `http.uploadpack`), dumb-protocol file fallback.
Smart HTTP server
git:// server [git-daemon, advanced] TCP listener for the git protocol: `git-daemon-export-ok`, `--base-path`, `--export-all`, per-service enablement, virtual hosting via the `host=` parameter, access hooks.
git:// server
Dumb-server info files [server-info, advanced] `update-server-info` writes `info/refs` and `objects/info/packs` so a static web server can serve the repository.
Dumb-server info files
Scale & acceleration: Optional derived data structures. A repository is correct without them, but an implementation must either keep them consistent or know to ignore or drop them.
Scale & acceleration
10
HISTORY ACCELERATION
Commit-graph file [commit-graph, advanced] Chunked file with OID fanout/lookup, commit data (tree, parents, time), extra edges, topological levels and corrected-commit-date generation numbers (v2); split chains under `commit-graphs/`; used to cut walks short; write and verify.
Commit-graph file
Changed-path Bloom filters [bloom-filters, advanced] Per-commit Bloom filters of changed paths (`BIDX`/`BDAT`, hash versions 1 and 2) that let path-limited walks skip commits without diffing trees.
Changed-path Bloom filters
PACK ACCELERATION
Reverse index (.rev) [pack-rev-index, advanced] Pack-offset-order to index-position mapping on disk (`RIDX`), sparing the in-memory sort needed for object sizes and bitmap use.
Reverse index (.rev)
Multi-pack-index [multi-pack-index, advanced] One index over many packs: `PNAM`, OID fanout/lookup, offsets and large offsets, optional `RIDX` and `BTMP` chunks, preferred pack; write, verify, expire, repack; incremental MIDX chains.
Multi-pack-index
Reachability bitmaps [bitmaps, advanced] EWAH-compressed bitmaps of objects reachable from selected commits, per pack or per MIDX: type bitmaps, XOR-chained entries, name-hash cache, lookup table, pseudo-merge bitmaps; used to count and enumerate objects and to reuse pack data verbatim.
Reachability bitmaps
INDEX ACCELERATION
Split index [split-index, advanced] The `link` extension: a `sharedindex.<hash>` base plus delete and replace bitmaps in the main index; writing, re-basing at the `splitIndex.maxPercentChange` threshold, expiring old shared files.
Split index
Untracked cache [untracked-cache, advanced] The `UNTR` extension caching per-directory untracked listings keyed by directory mtime and exclude-file hashes; invalidated by relevant config and ignore-file changes.
Untracked cache
Filesystem monitor [fsmonitor, advanced] The `FSMN` extension (token plus dirty bitmap) and its providers: the `core.fsmonitor` hook protocol (v1, v2) and the built-in daemon over IPC; entries proven unchanged skip lstat.
Filesystem monitor
Index loading extensions [index-load-extensions, advanced] `EOIE` (end-of-index-entries offset with extension hash) and `IEOT` (entry offset table) enabling multi-threaded index reads.
Index loading extensions
Sparse index [sparse-index, advanced] `sdir`: whole directories outside the sparse-checkout cone collapse into one tree entry (mode 040000); commands expand on demand or operate natively on the collapsed form.
Sparse index
Integration & interchange: Nested repositories, extension points, cryptographic signing and non-native exchange formats.
Integration & interchange
12
SUBMODULES
Gitlink entries [gitlinks, common] Mode-160000 tree and index entries naming a commit in another repository: never looked up locally, shown as a `Subproject commit` diff, checked out as an empty directory, reported by status according to the nested repository's state.
Gitlink entries
.gitmodules configuration [gitmodules, common] Parse `.gitmodules` from worktree, index or a commit (`submodule.<name>.path/url/branch/update/ignore/shallow/fetchRecurseSubmodules`); validate names, URLs and paths against option- and path-injection; overlay with `.git/config`.
.gitmodules configuration
Submodule operations [submodule-workflow, common] add, init, update (checkout/rebase/merge/none, `--remote`, `--recursive`), sync, deinit, status, summary, foreach, set-url, set-branch, absorbgitdirs; git directories under `.git/modules/`; `--recurse-submodules` in clone, fetch, checkout, push and grep.
Submodule operations
HOOKS, SIGNATURES & TRAILERS
Client-side hooks [hooks, common] Find hooks in `$GIT_DIR/hooks` or `core.hooksPath`, run them with the documented arguments, stdin, cwd and environment, and honour their exit status: pre-commit, prepare-commit-msg, commit-msg, post-commit, pre-merge-commit, post-merge, pre-rebase, post-rewrite, post-checkout, pre-push, reference-transaction, post-index-change, pre-auto-gc.
Client-side hooks
Server-side hooks [server-hooks, advanced] pre-receive, update, post-receive, post-update, proc-receive, push-to-checkout: stdin formats, quarantine environment, push options and certificates in env, hook output relayed over sideband, per-ref rejection.
Server-side hooks
Signing [signing, common] Create signed commits, tags and pushes via `gpg.format` openpgp, x509 or ssh, `user.signingKey`, `gpg.<format>.program`, `commit.gpgSign`, `tag.gpgSign`, ssh `defaultKeyCommand`.
Signing
Signature verification [signature-verification, common] Verify commit, tag and merge-tag signatures: `verify-commit`, `verify-tag`, `log --show-signature`, `%G?`-family placeholders, `gpg.minTrustLevel`, ssh `allowedSignersFile`/`revocationFile`, `merge --verify-signatures`.
Signature verification
Trailers [trailers, common] Parse and edit the trailer block of a message: `trailer.*` config (key aliases, where, ifExists, ifMissing, command), `--signoff`, `commit --trailer`, `%(trailers:...)` formatting.
Trailers
INTERCHANGE FORMATS
Bundles [bundle, common] Bundle v2 and v3 (capabilities `object-format`, `filter`): header of prerequisites and refs followed by a pack; create from revision arguments, verify, list-heads, unbundle, and use as a fetch/clone source.
Bundles
Archives [archive, common] tar (pax global header carrying the commit ID, deterministic metadata), zip and filter-based `tar.<format>.command` outputs; `--prefix`, path limiting, `export-ignore` and `export-subst` attributes; `--remote` with `upload-archive`.
Archives
fast-export [fast-export, advanced] Serialize history as a fast-import stream: blobs, commits with file changes, tags, resets, marks import/export, `--anonymize`, signed-object handling, rename/copy detection, path limiting.
fast-export
fast-import [fast-import, advanced] Consume the stream language: `blob`, `commit` (filemodify, filedelete, filecopy, filerename, deleteall, notemodify), `tag`, `reset`, `alias`, marks, `checkpoint`, `progress`, `feature`, `option`, `ls`, `cat-blob`, `get-mark`; writes packs directly.
fast-import
Command-line surface: Conventions of the `git` executable itself. Out of scope for library-only implementations; per-command coverage is tracked through each feature's `commands`.
Command-line surface
6
Dispatch & global options [cli-dispatch, common] `git [-C <dir>] [-c k=v] [--git-dir] [--work-tree] [--bare] [--namespace] [--no-pager] [--no-replace-objects] [--literal-pathspecs] ... <command>`, external `git-<name>` commands on PATH, exit codes (128 fatal, 129 usage), running outside a repository.
Dispatch & global options
Option parsing conventions [cli-options, common] gitcli rules: bundled short options, stuck and separate arguments, `--no-` negation, unique-prefix abbreviation of long options, `--` and `--end-of-options`, revision-versus-path disambiguation.
Option parsing conventions
Aliases & autocorrect [cli-aliases, common] `alias.*` expansion with argument splitting, shell aliases (`!cmd`), loop detection, no overriding of built-ins; `help.autoCorrect` suggestions.
Aliases & autocorrect
Color, pager & columns [cli-presentation, common] `color.*` with tty auto-detection and slot config, `core.pager`/`pager.<cmd>`/`GIT_PAGER` and paging rules, `column.*` layout, progress meters on stderr only when it is a tty.
Color, pager & columns
Editor & prompts [cli-editor, common] Editor selection (`GIT_EDITOR`, `core.editor`, `VISUAL`, `EDITOR`), `GIT_SEQUENCE_EDITOR`, the dumb-terminal refusal, commented help text and `core.commentChar`; `GIT_ASKPASS`/`SSH_ASKPASS` and `GIT_TERMINAL_PROMPT`.
Editor & prompts
Trace2 telemetry [trace2, advanced] Structured tracing to `GIT_TRACE2`, `GIT_TRACE2_PERF` and `GIT_TRACE2_EVENT` targets (files, fds, unix sockets): the event schema for start, exit, child processes, regions, data and config.
Trace2 telemetry
OBJECTS & STORAGE
REPOSITORY STATE
HISTORY & CONTENT
LOCAL OPERATIONS
NETWORK
SCALE & INTEGRATION
Foundations feeds Object model: ids · zlib
ids · zlib
Object model feeds Object storage: encoded objects
encoded objects
Foundations feeds References: names · config · locks
names · config · locks
References feeds Repository: HEAD · ref store
HEAD · ref store
Repository feeds Index & working tree: git dir · worktree root
git dir · worktree root
Object storage feeds Index & working tree: blobs & trees
blobs & trees
References feeds Revisions & traversal: tips to walk from
tips to walk from
Revisions & traversal feeds Diff & patch: commits to compare
commits to compare
Index & working tree feeds Diff & patch: entries to compare
entries to compare
Diff & patch feeds Merge: xdiff · renames
xdiff · renames
Revisions & traversal feeds Integrity & maintenance: reachability
reachability
Diff & patch feeds History inspection: per-commit diffs
per-commit diffs
Merge feeds Local workflows: merges
merges
Wire protocol & transports feeds Fetch, push & serving: packets · transports
packets · transports
Local workflows feeds Fetch, push & serving: checkout · merge for clone & pull
checkout · merge for clone & pull
Fetch, push & serving feeds Integration & interchange: submodule fetch
submodule fetch
+
−
⤢