GITREPOSITORY-LAYOUT(5) Git Manual GITREPOSITORY-LAYOUT(5) (NAME) gitrepository-layout - (SYNOPSIS) $GIT_DIR/* (DESCRIPTION) : o .git (working tree) o .git (bare - ) (push) (fetch) . : .git gitdir: . gitfile git submodule git worktree . (submodule checkout) (superproject) git checkout . checkout . : objects (object store) . ( ) . 1. (shallow clone) . git-clone(1) . 2. objects/info/alternates $GIT_ALTERNATE_OBJECT_DIRECTORIES . objects/info/alternates . $GIT_COMMON_DIR "$GIT_COMMON_DIR/objects" . objects/[0-9a-f][0-9a-f] . sha1 objects . ( / loose) . objects/pack ( ) . objects/info . objects/info/packs . git update-server-info . git repack . objects/info/alternates . HTTP alternates ( !) URL . objects/info/http-alternates . objects/info/http-alternates URL HTTP . refs . git prune . $GIT_COMMON_DIR ( refs/bisect refs/rewritten refs/worktree) "$GIT_COMMON_DIR/refs" . refs/heads/name name . refs/tags/name ( ). refs/remotes/name . refs/replace/ SHA-1 . info/grafts git- replace(1) . grafts . packed-refs refs/heads/ refs/tags/ . git- pack-refs(1) . $GIT_COMMON_DIR "$GIT_COMMON_DIR/packed-refs" . HEAD symref ( ) refs/heads/ . ( bare) HEAD (porcelains) <<>> ( master) . name () . symref (symlink) . HEAD symref . HEAD (detached HEAD) . git-checkout(1) . config . $GIT_COMMON_DIR "$GIT_COMMON_DIR/config" . config.worktree ( git- worktree(1) ). branches URL git fetch git pull git push. branches/ name repository . REMOTES git-fetch(1) . . $GIT_COMMON_DIR "$GIT_COMMON_DIR/branches" . Git 3.0 . hooks . git init . .sample . githooks(5) . $GIT_COMMON_DIR "$GIT_COMMON_DIR/hooks" . common $GIT_DIR . common . index . . sharedindex. $GIT_DIR/index . (split index) . info . $GIT_COMMON_DIR "$GIT_COMMON_DIR/info" . info/refs . git update-server-info . hooks/update git push git-receive-pack . info/grafts . . grafts git-replace(1) . info/exclude (exclude) . .gitignore . git status git add git rm git clean . : gitignore(5). info/attributes (attributes) .gitattributes . : gitattributes(5). info/sparse-checkout (sparse checkout) . : git- read-tree(1). remotes URL git fetch git pull git push . REMOTES git-fetch(1) . . $GIT_COMMON_DIR "$GIT_COMMON_DIR/remotes" . Git 3.0 . logs . git- update-ref(1) . $GIT_COMMON_DIR ( logs/HEAD) "$GIT_COMMON_DIR/logs" . logs/refs/heads/name name . logs/refs/tags/name name . shallow info/grafts (shallow clone) . --depth git-clone(1) git-fetch(1) . $GIT_COMMON_DIR "$GIT_COMMON_DIR/shallow" . commondir $GIT_COMMON_DIR ( git(1) ) . $GIT_DIR . commondir "commondir" . modules . worktrees . . $GIT_COMMON_DIR "$GIT_COMMON_DIR/worktrees" . worktrees//gitdir .git . . (mtime) . worktrees//locked . worktrees/ git worktree prune (prune) . . worktrees//config.worktree . (GIT REPOSITORY FORMAT VERSIONS) core.repositoryformatversion config . . . . : o ( index pack ). . o ( pack ). . . . 0 git:// 1 1 . ( ) ( ). . : 0 ( ) . . 1 0 : 1. core.repositoryformatversion extensions . 2. extensions.* . . core.repositoryformatversion 0 ( 1 ). extensions.* git-config(1) . . (SEE ALSO) git-init(1), git-clone(1), git-config(1), git-fetch(1), git-pack- refs(1), git-gc(1), git-checkout(1), gitglossary(7), The Git User's Manual[1] (GIT) git(1) (NOTES) 1. The Git User's Manual file:///usr/share/doc/git-doc/user-manual.html Git 2.55.0 2026-06-29 GITREPOSITORY-LAYOUT(5)