Git Glossary

Updated · 9 min read
easyGit 2.53gitglossarytermsreferenceassessment

A glossary is a small dictionary for one subject. Git has a lot of its own words, and some everyday words, such as "branch", "index" or "upstream", mean something specific in Git. This page explains 71 of them in one or two plain sentences each, in alphabetical order, with a link to the lesson that explains the term properly.

A

TermMeaningLesson
Annotated tagA tag stored as its own object, with the tagger, a date, a message and optionally a signature. Used for releases.Git Tag

B

TermMeaningLesson
Bare repositoryA repository with no working tree, only the contents of .git. Servers keep bare repositories.Git Remote
BisectA binary search through history to find the commit that introduced a bug.Git Bisect
BlameA view showing, for each line of a file, the commit and author that last changed it.Git Blame
BlobThe object that stores one version of a file's content, without its name.Git Objects: Blob, Tree, Commit and Tag
BranchA movable name that points to a commit. New commits on the branch move it forward.Git Branch
BundleA single file holding commits and refs, which you can clone or fetch from like a remote.Git Bundle and Archive

C

TermMeaningLesson
CheckoutUpdating the working tree to a branch or commit. Modern Git splits it into git switch and git restore.Git Switch and Checkout
Cherry-pickCopying the changes of an existing commit onto the current branch as a new commit.Git Cherry-Pick
CloneA complete copy of a repository, including all history, made with git clone.Git Clone
CommitA saved snapshot of the project with an author, a date, a message and its parent commits.Git Commit
Commit-graphA file that stores parents and generation numbers of every commit, to speed up history commands.Keeping Repositories Fast
ConflictTwo changes to the same part of a file that Git can't combine on its own, marked with <<<<<<<, ======= and >>>>>>>.Resolving Merge Conflicts

D

TermMeaningLesson
Detached HEADThe state where HEAD points directly at a commit instead of a branch.HEAD and Detached HEAD
DiffA list of the lines removed (-) and added (+) between two versions.How to Read a Diff

F

TermMeaningLesson
Fast-forwardA merge where the branch simply moves forward to the other commit, with no merge commit.Fast-Forward vs Merge Commit
FetchDownloading new commits and refs from a remote without changing your branches.Git Fetch
ForkA copy of a repository under your own account on a hosting platform, used to contribute through pull requests.Forking a Repository

G

TermMeaningLesson
Garbage collectionHousekeeping (git gc) that packs objects and deletes old unreachable ones.Packfiles and Garbage Collection
.gitattributesA committed file of per-path rules: line endings, binary files, diff drivers, merge drivers and LFS tracking.Git .gitattributes and Line Endings
.gitignoreA file listing untracked files and folders Git should ignore.Git .gitignore

H

TermMeaningLesson
Hash (object ID)The ID of an object, computed from its content: 40 hex digits with SHA-1, 64 with SHA-256.Git Internals Overview
HEADWhat is checked out now: usually a branch, sometimes a commit (detached).HEAD and Detached HEAD
HookA script Git runs at certain moments, such as before a commit (pre-commit) or a push (pre-push).Git Hooks
HunkOne block of changed lines in a diff, starting with an @@ line.How to Read a Diff

I

TermMeaningLesson
Index (staging area)The draft of the next commit: the list of files and contents git add has recorded.Working Tree, Staging Area and Repository
Interactive rebaseA rebase (git rebase -i) where you edit a to-do list to reorder, squash, reword or drop commits.Interactive Rebase

L

TermMeaningLesson
Large File Storage (LFS)An extension that keeps large files on a separate server and stores small pointers in Git.Git Large File Storage (LFS)
Lightweight tagA tag that is only a name pointing at a commit, with no object of its own.Git Tag

M

TermMeaningLesson
mainThe usual name of a repository's default branch.Git Branch
MergeJoining two lines of history, usually with a merge commit that has two parents.Git Merge
Merge baseThe best common ancestor of two commits, used as the base of a three-way merge.How Git Merges
Merge commitA commit with two or more parents, recording a merge.Git Merge
MonorepoOne repository holding many projects, often very large.Git Sparse Checkout

O

TermMeaningLesson
ObjectAnything Git stores in its database: a blob, tree, commit or annotated tag.Git Objects: Blob, Tree, Commit and Tag
originThe default name of the remote a repository was cloned from.Git Remote

P

TermMeaningLesson
PackfileA compressed file holding many objects, some stored as deltas against similar ones.Packfiles and Garbage Collection
Partial cloneA clone that leaves out file contents (or folder listings) until they are needed.Shallow and Partial Clones
PatchA file describing changes as a diff, created with git diff or git format-patch.Git Patches: Sharing Commits as Files
PickaxeThe git log -S search for commits that added or removed some text.Searching History: Grep, -S and -L
PlumbingLow-level commands meant for scripts, such as git cat-file and git update-ref.Build a Commit by Hand
PorcelainEveryday commands meant for people, such as git commit and git log.Build a Commit by Hand
PullFetching and then merging (or rebasing) the fetched commits into the current branch.Git Pull
Pull request (merge request)A hosting platform's request to review and merge a branch. GitLab calls it a merge request.Pull Requests and Merge Requests
PushUploading commits to a remote and moving its branch.Git Push

R

TermMeaningLesson
RebaseReplaying commits on top of a different base commit, creating new commits.Git Rebase
Ref (reference)A name that points to an object, such as a branch, tag or HEAD.The Index and Refs
ReflogThe local log of every position HEAD and each branch have had.Git Reflog
RefspecA rule that maps remote refs to local ones during fetch and push, such as +refs/heads/*:refs/remotes/origin/*.Working with Several Remotes
ReftableA compact storage format for refs, planned as the default for new repositories in Git 3.0.Git 3.0: What Is Planned
RemoteAnother copy of the repository, usually on a server, known by a name such as origin.Git Remote
Remote-tracking branchYour local record of where a remote branch was at the last fetch, such as origin/main.Upstream and Remote-Tracking Branches
RepositoryA project's files plus the full history Git keeps in .git.Git Init: Creating a Repository
Rerere"Reuse recorded resolution": Git remembers how you resolved a conflict and applies it again.Git Rerere
ResetMoving the current branch to another commit, optionally changing the index and working tree.Git Reset: Soft, Mixed and Hard
RevertA new commit that undoes the changes of an earlier one.Git Revert

S

TermMeaningLesson
SHA-256The stronger hash function Git supports for object IDs, planned as the default for new repositories.Git 3.0: What Is Planned
Signed commitA commit carrying a GPG or SSH signature that proves who made it.Signing Commits and Tags
SnapshotThe complete state of every file at one commit. Git stores snapshots, not diffs.How Git Works: Snapshots, Not Differences
Sparse checkoutChecking out only some folders of a repository into the working tree.Git Sparse Checkout
SquashCombining several commits into one.Interactive Rebase
StashA saved set of uncommitted changes, put aside with git stash.Git Stash
SubmoduleA repository inside another, pinned to an exact commit.Git Submodules
SubtreeAnother project's files copied into a folder, with commands to pull and push changes.Git Subtree

T

TermMeaningLesson
TagA fixed name for a commit, usually a release such as v1.2.0.Git Tag
Three-way mergeA merge that compares both sides with their merge base.How Git Merges
TreeThe object that lists a folder's entries: names, modes and the IDs of blobs and subtrees.Git Objects: Blob, Tree, Commit and Tag

U

TermMeaningLesson
Untracked fileA file in the working tree that Git doesn't track yet.Git Status and File States
UpstreamThe remote branch a local branch pushes to and pulls from. Also the usual name for the original repository of a fork.Upstream and Remote-Tracking Branches

W

TermMeaningLesson
Working treeThe files you see and edit, checked out from a commit.Working Tree, Staging Area and Repository
WorktreeAn extra working folder for the same repository, with its own branch.Git Worktree

Was this tutorial helpful?