Skip to content

Latest commit

 

History

History
59 lines (56 loc) · 6.15 KB

File metadata and controls

59 lines (56 loc) · 6.15 KB
title Glossary
description Key Git terms and definitions — blob, branch, commit, HEAD, merge, rebase, remote, stash, tag, and more.
section glossary
order 9

Glossary

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

Term Definition Chapter
Annotated tag A tag object with author, date, and message — stored in .git/objects/ 2
Bare repository A repository with no working tree — only .git/ internals 2
Bisect Binary search through commit history to find the commit that introduced a bug 6
Blame Show which commit and author last modified each line of a file 7
Blob Object that stores the raw contents of a single file 2
Branch A movable pointer to a commit, stored in .git/refs/heads/ 2
Cherry-pick Copy a single commit from one branch onto another, creating a new commit with a different hash 3
Clone Create a local copy of a remote repository, including full history, origin remote, and tracking branches 4
Commit An object that records a snapshot of the project — references a tree, parent commits, author, and message 2
Conflict When two branches modify the same lines and Git cannot merge them automatically 3
Detached HEAD State where HEAD points directly to a commit instead of a branch — new commits are orphaned if you switch away 2
Fast-forward A merge where the target branch simply moves forward to the source branch tip — no merge commit is created 3
Fetch Download commits from a remote and update remote-tracking branches without modifying local branches 4
Fork A hosting-platform copy of someone else's repository under your account 4
Garbage collection Git's process for removing orphaned objects from .git/objects/ 6
Hash A unique 40-character identifier (SHA-1) computed from an object's content 2
HEAD Reference to the current position — usually points to a branch, sometimes directly to a commit (detached) 2
Hook A script in .git/hooks/ that Git runs automatically before or after events like commit or push 6
Index The staging area — a sorted list of tracked files prepared for the next commit, stored at .git/index 2
Interactive rebase Editing, reordering, squashing, or dropping commits before sharing them 6
Lightweight tag A tag that is just a file in .git/refs/tags/ containing a commit hash — no object, no metadata 2
Merge Combining changes from two branches into one, optionally creating a merge commit 3
Merge commit A commit with two or more parents, created by a 3-way merge 3
Origin Conventional name for the remote you cloned from 4
Orphaned commit A commit no branch or tag points to — eligible for garbage collection after reflog expiry 6
Pathspec A pattern that matches files or directories in Git commands 6
Pull Fetch from a remote and merge (or rebase) into the current branch 4
Pull request A hosting-platform feature for requesting review and merge of a branch 4
Push Upload local commits to a remote branch 4
Rebase Replay commits from one branch on top of another, producing a linear history 3
Reflog A local log of every position HEAD and branch tips have been in — used to recover lost commits 6
Refspec Syntax that maps references between a remote and a local repository (e.g. +refs/heads/*:refs/remotes/origin/*) 6
Remote A named reference to another repository, stored in .git/config 4
Remote-tracking branch A read-only local reference that mirrors a remote branch (e.g. origin/main), updated by fetch and pull 4
Repository The .git/ directory containing all objects, references, and configuration for a project 2
Reset Move HEAD and optionally the branch tip to a different commit — --soft, --mixed, or --hard 2
Revert Create a new commit that undoes a previous commit's changes without rewriting history 7
Squash merge Combine all commits from a branch into a single change set on the target branch — no merge commit 3
Stash Save uncommitted changes temporarily so you can switch branches with a clean working tree 3
Submodule A reference to a specific commit in another repository — stores URL and hash, not files 5
Subtree A full copy of another repository merged into a subdirectory of the parent project 5
Tag A named reference to a commit — annotated (object with metadata) or lightweight (plain reference) 2
Tree Object that represents a directory — lists blobs and other trees with names and permissions 2
Upstream Conventional name for the original repository you forked from 4
Working tree The checked-out files on disk that you edit directly — everything outside .git/. Also called worktree or workspace 1, 2
Worktree See Working tree