Glossary

Glossary

A reference of key Git terms used throughout this tutorial, with links to the chapter where each concept is covered.

TermDefinitionChapter
Annotated tagA tag object with author, date, and message — stored in .git/objects/2
Bare repositoryA repository with no working tree — only .git/ internals2
BisectBinary search through commit history to find the commit that introduced a bug6
BlameShow which commit and author last modified each line of a file7
BlobObject that stores the raw contents of a single file2
BranchA movable pointer to a commit, stored in .git/refs/heads/2
Cherry-pickCopy a single commit from one branch onto another, creating a new commit with a different hash3
CloneCreate a local copy of a remote repository, including full history, origin remote, and tracking branches4
CommitAn object that records a snapshot of the project — references a tree, parent commits, author, and message2
ConflictWhen two branches modify the same lines and Git cannot merge them automatically3
Detached HEADState where HEAD points directly to a commit instead of a branch — new commits are orphaned if you switch away2
Fast-forwardA merge where the target branch simply moves forward to the source branch tip — no merge commit is created3
FetchDownload commits from a remote and update remote-tracking branches without modifying local branches4
ForkA hosting-platform copy of someone else’s repository under your account4
Garbage collectionGit’s process for removing orphaned objects from .git/objects/6
HashA unique 40-character identifier (SHA-1) computed from an object’s content2
HEADReference to the current position — usually points to a branch, sometimes directly to a commit (detached)2
HookA script in .git/hooks/ that Git runs automatically before or after events like commit or push6
IndexThe staging area — a sorted list of tracked files prepared for the next commit, stored at .git/index2
Interactive rebaseEditing, reordering, squashing, or dropping commits before sharing them6
Lightweight tagA tag that is just a file in .git/refs/tags/ containing a commit hash — no object, no metadata2
MergeCombining changes from two branches into one, optionally creating a merge commit3
Merge commitA commit with two or more parents, created by a 3-way merge3
OriginConventional name for the remote you cloned from4
Orphaned commitA commit no branch or tag points to — eligible for garbage collection after reflog expiry6
PathspecA pattern that matches files or directories in Git commands6
PullFetch from a remote and merge (or rebase) into the current branch4
Pull requestA hosting-platform feature for requesting review and merge of a branch4
PushUpload local commits to a remote branch4
RebaseReplay commits from one branch on top of another, producing a linear history3
ReflogA local log of every position HEAD and branch tips have been in — used to recover lost commits6
RefspecSyntax that maps references between a remote and a local repository (e.g. +refs/heads/*:refs/remotes/origin/*)6
RemoteA named reference to another repository, stored in .git/config4
Remote-tracking branchA read-only local reference that mirrors a remote branch (e.g. origin/main), updated by fetch and pull4
RepositoryThe .git/ directory containing all objects, references, and configuration for a project2
ResetMove HEAD and optionally the branch tip to a different commit — --soft, --mixed, or --hard2
RevertCreate a new commit that undoes a previous commit’s changes without rewriting history7
Squash mergeCombine all commits from a branch into a single change set on the target branch — no merge commit3
StashSave uncommitted changes temporarily so you can switch branches with a clean working tree3
SubmoduleA reference to a specific commit in another repository — stores URL and hash, not files5
SubtreeA full copy of another repository merged into a subdirectory of the parent project5
TagA named reference to a commit — annotated (object with metadata) or lightweight (plain reference)2
TreeObject that represents a directory — lists blobs and other trees with names and permissions2
UpstreamConventional name for the original repository you forked from4
Working treeThe checked-out files on disk that you edit directly — everything outside .git/2