GITGLOSSARY(7)

๐ŸŽ€ NAME ๐ŸŽ€

gitglossary โ€” A Git Glossary

okay bestie, welcome to GITGLOSSARY(7) ๐Ÿ’… this is the Git glossary, and weโ€™re about to make all those mysterious Git words make sense. no cap.

โœจ SYNOPSIS โœจ

*

๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay so this is the big vibe-check list of Git terminology. every word here is a little piece of Git lore, and weโ€™re going through them one by one. letโ€™s get into it ๐Ÿซถ

alternate object database

So the alternates mechanism lets a repository inherit part of its object database from another object database โ€” and that other object database is what we call an "alternate". itโ€™s giving โ€œborrowing your bestieโ€™s notes but make it Git.โ€ โœจ

bare repository

A bare repository is normally an appropriately named directory with a .git suffix that does not have a locally checked-out copy of any of the files under revision control. like, all of the Git administrative and control files that would normally be present in the hidden .git sub-directory are directly present in the repository.git directory instead, and no other files are present and checked out. usually, publishers of public repositories make bare repositories available. very โ€œno working tree, just vibes.โ€ ๐Ÿ‘‘

blob object

an untyped object, e.g. the contents of a file. simple as that. adorable, honestly. ๐Ÿ“

branch

A "branch" is a line of development. the most recent commit on a branch is referred to as the tip of that branch. the tip of the branch is referenced by a branch head, which moves forward as additional development is done on the branch. a single Git repository can track an arbitrary number of branches, but your working tree is associated with just one of them โ€” the "current" or "checked out" branch โ€” and HEAD points to that branch. main character branch energy, but only one can be checked out at a time ๐Ÿ’…

cache

obsolete for: index. thatโ€™s it. thatโ€™s the entry. ๐Ÿ™ˆ

chain

A list of objects, where each object in the list contains a reference to its successor โ€” for example, the successor of a commit could be one of its parents. linked-list realness, but make it Git. ๐Ÿ”—

changeset

This is BitKeeper/cvsps speak for "commit". Since Git does not store changes, but states, it really does not make sense to use the term "changesets" with Git. so yeah, itโ€™s giving โ€œold terminology, we donโ€™t really use it.โ€ ๐Ÿ’€

checkout

The action of updating all or part of the working tree with a tree object or blob from the object database, and updating the index and HEAD if the whole working tree has been pointed at a new branch. like a whole little coordinate switch-up for your files. ๐Ÿฆ‹

cherry-picking

In SCM jargon, "cherry pick" means to choose a subset of changes out of a series of changes (typically commits) and record them as a new series of changes on top of a different codebase. In Git, this is performed by the git cherry-pick command to extract the change introduced by an existing commit and to record it based on the tip of the current branch as a new commit. itโ€™s literally โ€œooh that one commit is cute, I want it over here.โ€ ๐Ÿ’โœจ

clean

A working tree is clean if it corresponds to the revision referenced by the current head. also see "dirty". itโ€™s the โ€œmy room is spotlessโ€ state of your repo. ๐Ÿงš

commit

As a noun: a single point in the Git history; the entire history of a project is represented as a set of interrelated commits. the word "commit" is often used by Git in the same places other revision control systems use the words "revision" or "version". also used as a short hand for commit object.

As a verb: the action of storing a new snapshot of the projectโ€™s state in the Git history, by creating a new commit representing the current state of the index and advancing HEAD to point at the new commit. so itโ€™s both a noun and an action โ€” very versatile, very iconic. ๐Ÿ‘‘

commit graph concept, representations and usage

A synonym for the DAG structure formed by the commits in the object database, referenced by branch tips, using their chain of linked commits. this structure is the definitive commit graph. the graph can be represented in other ways, e.g. the "commit-graph" file. itโ€™s the map of your commit history, and yes, itโ€™s giving lore. ๐Ÿ—บ๏ธ

commit-graph file

The "commit-graph" (normally hyphenated) file is a supplemental representation of the commit graph which accelerates commit graph walks. the "commit-graph" file is stored either in the .git/objects/info directory or in the info directory of an alternate object database. speed boost, but make it a file. โšก

commit object

An object which contains the information about a particular revision, such as parents, committer, author, date and the tree object which corresponds to the top directory of the stored revision. itโ€™s got the whole backstory: who, when, where, and what tree. ๐ŸŒณ

commit-ish (also committish)

A commit object or an object that can be recursively dereferenced to a commit object. the following are all commit-ishes: a commit object, a tag object that points to a commit object, a tag object that points to a tag object that points to a commit object, etc. yes, itโ€™s commit-ish. yes, it can go recursive. yes, it ate. ๐Ÿ’…

core Git

Fundamental data structures and utilities of Git. exposes only limited source code management tools. itโ€™s the bare-bones heart of Git, no extra garnish. ๐Ÿ’œ

DAG

Directed acyclic graph. the commit objects form a directed acyclic graph, because they have parents (directed), and the graph of commit objects is acyclic โ€” there is no chain which begins and ends with the same object. no loops, no drama, just direction. ๐Ÿ”ฅ

dangling object

An unreachable object which is not reachable even from other unreachable objects; a dangling object has no references to it from any reference or object in the repository. itโ€™s literally floating in the void with no one pointing at it. ๐Ÿ˜ญ๐Ÿ’€

dereference

Referring to a symbolic ref: the action of accessing the reference pointed at by a symbolic ref. recursive dereferencing involves repeating the aforementioned process on the resulting ref until a non-symbolic reference is found.

Referring to a tag object: the action of accessing the object a tag points at. tags are recursively dereferenced by repeating the operation on the result object until the result has either a specified object type (where applicable) or any non-"tag" object type. a synonym for "recursive dereference" in the context of tags is "peel".

Referring to a commit object: the action of accessing the commitโ€™s tree object. commits cannot be dereferenced recursively.

Unless otherwise specified, "dereferencing" as it used in the context of Git commands or protocols is implicitly recursive. so yes, bestie, assume it goes all the way down unless told otherwise. ๐ŸŒ€

detached HEAD

Normally the HEAD stores the name of a branch, and commands that operate on the history HEAD represents operate on the history leading to the tip of the branch the HEAD points at. however, Git also allows you to check out an arbitrary commit that isnโ€™t necessarily the tip of any particular branch. the HEAD in such a state is called "detached".

note that commands that operate on the history of the current branch (e.g. git commit to build a new history on top of it) still work while the HEAD is detached. they update the HEAD to point at the tip of the updated history without affecting any branch. commands that update or inquire information about the current branch (e.g. git branch --set-upstream-to that sets what remote-tracking branch the current branch integrates with) obviously do not work, as there is no (real) current branch to ask about in this state. itโ€™s giving โ€œfree-floating main character,โ€ and some commands are not gonna know what to do with that. ๐Ÿซ 

directory

The list you get with ls :-) yes, thatโ€™s the whole definition. and honestly? iconic. ๐Ÿ“โœจ

dirty

A working tree is said to be "dirty" if it contains modifications which have not been committed to the current branch. itโ€™s the โ€œI changed stuff but didnโ€™t commit yetโ€ state. also see "clean". ๐Ÿ™ˆ

evil merge

An evil merge is a merge that introduces changes that do not appear in any parent. spooky name, but the definition is right there โ€” changes that arenโ€™t in any parent. ๐Ÿ˜ˆ

fast-forward

A fast-forward is a special type of merge where you have a revision and you are "merging" another branch's changes that happen to be a descendant of what you have. in such a case, you do not make a new merge commit but instead just update your branch to point at the same revision as the branch you are merging. this will happen frequently on a remote-tracking branch of a remote repository. itโ€™s the โ€œjust slide forward, no new merge commit neededโ€ move. โฉโœจ

fetch

Fetching a branch means to get the branchโ€™s head ref from a remote repository, to find out which objects are missing from the local object database, and to get them, too. see also git-fetch(1). itโ€™s like going to the remote and being like โ€œhey, what do I not have yet?โ€ ๐Ÿ›๏ธ

file system

Linus Torvalds originally designed Git to be a user space file system, i.e. the infrastructure to hold files and directories. that ensured the efficiency and speed of Git. so Gitโ€™s origin story is lowkey file-system-coded. ๐Ÿงš

Git archive

Synonym for repository (for arch people). short, sweet, and for the arch girlies. ๐Ÿ›๏ธ

gitfile

A plain file .git at the root of a working tree that points at the directory that is the real repository. for proper use see git-worktree(1) or git-submodule(1). for syntax see gitrepository-layout(5). itโ€™s a little .git breadcrumb pointing at the real repo. ๐Ÿž

grafts

Grafts enable two otherwise different lines of development to be joined together by recording fake ancestry information for commits. this way you can make Git pretend the set of parents a commit has is different from what was recorded when the commit was created. configured via the .git/info/grafts file.

๐Ÿšจ real talk: note that the grafts mechanism is outdated and can lead to problems transferring objects between repositories; see git-replace(1) for a more flexible and robust system to do the same thing. so itโ€™s giving โ€œold hack, use the newer glow-up instead.โ€ ๐Ÿ’€

hash

In Gitโ€™s context, synonym for object name. thatโ€™s the whole entry. short and slay. ๐Ÿ”ข

A named reference to the commit at the tip of a branch. heads are stored in a file in $GIT_DIR/refs/heads/ directory, except when using packed refs. (see git-pack-refs(1).) itโ€™s the little name-tag for the tip of a branch. ๐Ÿท๏ธ

HEAD

The current branch. in more detail: your working tree is normally derived from the state of the tree referred to by HEAD. HEAD is a reference to one of the heads in your repository, except when using a detached HEAD, in which case it directly references an arbitrary commit. HEAD is that uppercase bestie you keep seeing everywhere. ๐Ÿ‘‘

head ref

A synonym for head. yes, another name for the same thing. Git loves a synonym moment. ๐Ÿ’…

hook

During the normal execution of several Git commands, call-outs are made to optional scripts that allow a developer to add functionality or checking. typically, the hooks allow for a command to be pre-verified and potentially aborted, and allow for a post-notification after the operation is done. the hook scripts are found in the $GIT_DIR/hooks/ directory, and are enabled by simply removing the .sample suffix from the filename. in earlier versions of Git you had to make them executable. so hooks are the little optional side-quest scripts of Git. ๐Ÿชโœจ

index

A collection of files with stat information, whose contents are stored as objects. the index is a stored version of your working tree. truth be told, it can also contain a second, and even a third version of a working tree, which are used when merging. see "THE INDEX" in gitdatamodel(7) for details. itโ€™s lowkey the staging areaโ€™s formal government name. ๐Ÿ—‚๏ธ

index entry

The information regarding a particular file, stored in the index. an index entry can be unmerged, if a merge was started, but not yet finished (i.e. if the index contains multiple versions of that file). so yeah, if a merge is mid-crisis, the index entry can hold multiple versions. ๐Ÿ˜ญ

master

The default development branch. whenever you create a Git repository, a branch named "master" is created, and becomes the active branch. in most cases, this contains the local development, though that is purely by convention and is not required. itโ€™s the classic default branch name, but remember: convention, not a requirement. ๐Ÿ’…

merge

ok so this one is literally two things at once, stay with me bestie ๐Ÿ’…

As a verb โ€” it's bringing the contents of another branch (possibly from an external repository, so from somewhere else entirely) into your current branch. And if that merged-in branch lives in a different repo, the way it happens is: first you fetch the remote branch, then you merge the result into your current branch. That fetch-then-merge combo has a whole name, it's called a pull. The merging itself is done by an automatic process that figures out what changes got made since the branches diverged, and then applies all those changes together. But if changes conflict? ๐Ÿ˜ญ manual intervention may be required to finish the merge. no cap.

As a noun โ€” unless it's a fast-forward, a successful merge results in the creation of a new commit representing the result of the merge, and that commit has as parents the tips of the merged branches. That commit is called a "merge commit", or sometimes just a "merge". slay.


object

the unit of storage in Git, periodt. It's uniquely identified by the SHA-1 of its contents, and because of that โ€” consequence time โ€” an object cannot be changed. ever. go see "OBJECTS" in gitdatamodel(7) for the full details ๐Ÿซถ

object database

it stores a set of "objects", and each individual object is identified by its object name. The objects usually live in $GIT_DIR/objects/. that's the home address ๐Ÿ 

object identifier, object ID, oid

all three are just synonyms for object name. same girl, different outfits ๐Ÿ’–

object name

the unique identifier of an object. It's usually represented by a 40 character hexadecimal string. also colloquially called SHA-1, iykyk.

object type

one of these identifiers: "commit", "tree", "tag" or "blob" โ€” describing the type of an object. four icons, no more ๐Ÿ’…


octopus

to merge more than two branches. that's it. that's the whole vibe check. ๐Ÿ™

orphan

the act of getting on a branch that does not exist yet (i.e., an unborn branch). After you do that, the commit first created becomes a commit without a parent โ€” it starts a brand new history. main character energy, no ancestors ๐Ÿ”ฅ

origin

the default upstream repository โœจ Most projects have at least one upstream project they track, and by default origin is the name used for that purpose. New upstream updates get fetched into remote-tracking branches named origin/name-of-upstream-branch, which you can see using git branch -r. easiest way to peek, bestie.

overlay

only update and add files to the working directory, but don't delete them โ€” similar to how cp -R would update the contents in the destination directory. This is the default mode in a checkout when checking out files from the index or a tree-ish. In contrast, no-overlay mode also deletes tracked files that aren't present in the source, similar to rsync --delete. two very different personalities tbh.

pack

a set of objects which have been compressed into one file โ€” to save space or to transmit them efficiently. little bundle, big savings ๐Ÿ’œ

pack index

the list of identifiers, and other information, of the objects in a pack, so we can efficiently access the contents of a pack. the pack's contact list, basically ๐Ÿ“‡


pathspec

the pattern used to limit paths in Git commands. we love a filter โœจ

Pathspecs get used on the command line of "git ls-files", "git ls-tree", "git add", "git grep", "git diff", "git checkout", and many other commands, to limit the scope of operations to some subset of the tree or working tree. Check the documentation of each command to find out whether paths are relative to the current directory or to the toplevel. The pathspec syntax goes like this:

  • any path matches itself
  • the pathspec up to the last slash represents a directory prefix, and the scope of that pathspec is limited to that subtree
  • the rest of the pathspec is a pattern for the remainder of the pathname. Paths relative to the directory prefix will be matched against that pattern using fnmatch(3); in particular, * and ? can match directory separators. wild.

For example, Documentation/*.jpg will match all .jpg files in the Documentation subtree, including Documentation/chapter_1/figure_1.jpg. ate, honestly.

A pathspec that begins with a colon : has special meaning. In the short form, the leading colon : is followed by zero or more "magic signature" letters (which optionally is terminated by another colon :), and the remainder is the pattern to match against the path. The "magic signature" consists of ASCII symbols that are neither alphanumeric, glob, regex special characters nor colon. The optional colon that terminates the "magic signature" can be omitted if the pattern begins with a character that doesn't belong to the "magic signature" symbol set and isn't a colon. iconic little ruleset.

In the long form, the leading colon : is followed by an open parenthesis (, a comma-separated list of zero or more "magic words", and a close parenthesis ), and the remainder is the pattern to match against the path.

A pathspec with only a colon means "there is no pathspec". ๐Ÿซถ This form should not be combined with other pathspec.

top

The magic word top (magic signature: /) makes the pattern match from the root of the working tree, even when you're running the command from inside a subdirectory. no more "wait, where am I" energy ๐Ÿ’€

literal

Wildcards in the pattern such as * or ? are treated as literal characters. so they mean โœจnothingโœจ and that's the point.

icase

Case insensitive match. simple as.

glob

Git treats the pattern as a shell glob suitable for consumption by fnmatch(3) with the FNM_PATHNAME flag: wildcards in the pattern will not match a / in the pathname. For example, "Documentation/*.html" matches "Documentation/git.html" but not "Documentation/ppc/ppc.html" or "tools/perf/Documentation/perf.html". look how specific she is.

Two consecutive asterisks ("**") in patterns matched against the full pathname may have special meaning:

  • A leading "**" followed by a slash means match in all directories. For example, "**/foo" matches file or directory "foo" anywhere. "**/foo/bar" matches file or directory "bar" anywhere that is directly under directory "foo".
  • A trailing "/**" matches everything inside. For example, "abc/**" matches all files inside directory "abc", relative to the location of the .gitignore file, with infinite depth. infinite. depth. ๐Ÿ˜ญ
  • A slash followed by two consecutive asterisks then a slash matches zero or more directories. For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
  • Other consecutive asterisks are considered invalid. ๐Ÿšฉ
Glob magic is incompatible with literal magic. they do not mix, bestie ๐Ÿ’€

attr

After attr: comes a space separated list of "attribute requirements", and all of them must be met in order for the path to be considered a match โ€” this is in addition to the usual non-magic pathspec pattern matching. See gitattributes(5).

Each of the attribute requirements for the path takes one of these forms:

  • "ATTR" requires that the attribute ATTR be set.
  • "-ATTR" requires that the attribute ATTR be unset.
  • "ATTR=VALUE" requires that the attribute ATTR be set to the string VALUE.
  • "!ATTR" requires that the attribute ATTR be unspecified.
Note that when matching against a tree object, attributes are still obtained from the working tree, not from the given tree object. ๐Ÿ™ˆ sneaky.

exclude

After a path matches any non-exclude pathspec, it will be run through all exclude pathspecs (magic signature: ! or its synonym ^). If it matches, the path is ignored. And when there is no non-exclude pathspec, the exclusion is applied to the result set as if invoked without any pathspec. bye-bye path ๐Ÿ’…


parent

A commit object contains a (possibly empty) list of the logical predecessor(s) in the line of development โ€” i.e. its parents. yes, commits have parents too, it's giving family tree ๐ŸŒˆ

peel

The action of recursively dereferencing a tag object. like unwrapping a present until you hit the actual thing ๐ŸŽ€

pickaxe

the term pickaxe refers to an option to the diffcore routines that help select changes that add or delete a given text string. With the --pickaxe-all option, it can be used to view the full changeset that introduced or removed, say, a particular line of text. See git-diff(1). iconic tool name, frankly ๐Ÿ‘‘

plumbing

cute name for core Git. that's literally the definition, she's just cute ๐Ÿ’–

porcelain

cute name for programs and program suites depending on core Git, presenting a high level access to core Git. Porcelains expose more of a SCM interface than the plumbing does. fancy on the outside, plumbing on the inside ๐Ÿซถ

per-worktree ref

Refs that are per-worktree, rather than global. This is presently only HEAD and any refs that start with refs/bisect/, but might later include other unusual refs. watch this space ๐Ÿ‘€

pseudoref

A ref that has different semantics than normal refs. These refs can be read via normal Git commands, but cannot be written to by commands like git-update-ref(1). read-only royalty, lowkey.

The following pseudorefs are known to Git:

  • FETCH_HEAD is written by git-fetch(1) or git-pull(1). It may refer to multiple object IDs. Each object ID is annotated with metadata indicating where it was fetched from and its fetch status.
  • MERGE_HEAD is written by git-merge(1) when resolving merge conflicts. It contains all commit IDs which are being merged.

pull

Pulling a branch means to fetch it and merge it. See also git-pull(1). two steps, one word, very efficient of her โœจ

push

Pushing a branch means to get the branch's head ref from a remote repository, find out if it is an ancestor to the branch's local head ref, and in that case, putting all objects, which are reachable from the local head ref, and which are missing from the remote repository, into the remote object database, and updating the remote head ref. And if the remote head is not an ancestor to the local head? the push fails. ๐Ÿ˜ญ that's the whole deal.

reachable

All of the ancestors of a given commit are said to be "reachable" from that commit. More generally, one object is reachable from another if we can reach the one from the other by a chain that follows tags to whatever they tag, commits to their parents or trees, and trees to the trees or blobs that they contain. follow the chain, bestie ๐Ÿ”—

reachability bitmaps

Reachability bitmaps store information about the reachability of a selected set of commits in a packfile, or a multi-pack index (MIDX), to speed up object search. The bitmaps are stored in a ".bitmap" file. A repository may have at most one bitmap file in use. That bitmap file may belong to either one pack, or the repository's multi-pack index (if it exists). speed demon behaviour โญ

rebase

okay so picture this: you take a whole series of changes from a branch, reapply them onto a different base, and then reset the head of that branch to whatever came out the other end. that's rebase. it's giving "moving house but keeping all your furniture" ๐Ÿššโœจ

ref

a name that points to an object name โ€” or to another ref (that second flavor is called a symbolic ref). for convenience, a ref can sometimes be abbreviated when you use it as an argument to a Git command, so go read gitrevisions(7) if you want the deets. refs live in the repository, that's their home ๐Ÿ 

the ref namespace is hierarchical, bestie. ref names must either start with refs/ or sit in the root of the hierarchy. for those root-level ones, the name has to follow these rules:

  • the name is made up of only upper-case characters or underscores
  • the name ends with _HEAD or is exactly equal to HEAD

there are some irregular refs chilling in the root of the hierarchy that do not match those rules. the following list is exhaustive and shall not be extended in the future (fr, that's the deal):

  • AUTO_MERGE
  • BISECT_EXPECTED_REV
  • NOTES_MERGE_PARTIAL
  • NOTES_MERGE_REF
  • MERGE_AUTOSTASH

different subhierarchies exist for different purposes, iykyk. for example, refs/heads/ is where local branches hang out, while refs/tags/ is where local tags live.

see also "REFERENCES" in gitdatamodel(7). ๐Ÿฆ‹

reflog

a reflog is basically the local "history" of a ref โ€” the receipts, the paper trail, the group chat scrollback ๐Ÿ“œ. it can tell you what the 3rd last revision in this repository was, and what the current state in this repository was yesterday at 9:14pm. iconic, honestly.

see "REFLOGS" in gitdatamodel(7) for a short explanation of the format, and git-reflog(1) for the full details.

refspec

a "refspec" is what fetch and push use to describe the mapping between a remote ref and a local ref. yes bestie, it's the matchmaker ๐Ÿ’˜. see git-fetch(1) or git-push(1) for details.

remote repository

a repository that's used to track the same project but lives somewhere else entirely. to talk to your remotes, see fetch or push. long-distance relationship, but make it git ๐ŸŒ๐Ÿ’Œ

remote-tracking branch

a ref that's used to follow changes from another repository. it typically looks like refs/remotes/foo/bar (which means: it's tracking a branch named bar inside a remote named foo ๐Ÿ•ต๏ธโ€โ™€๏ธ), and it matches the right-hand-side of a configured fetch refspec.

a remote-tracking branch should not contain direct modifications or have local commits made to it. hands off, bestie ๐Ÿ™…โ€โ™€๏ธ

repository

a collection of refs plus an object database holding all the objects reachable from those refs โ€” possibly accompanied by meta data from one or more porcelains. a repository can share an object database with other repositories via the alternates mechanism. sharing is caring ๐Ÿ’–

resolve

the action of fixing up manually whatever a failed automatic merge left behind. you, on your hands and knees, patching the vibes ๐Ÿฉน๐Ÿ˜ญ

revision

synonym for commit (the noun, not the verb โ€” slight but important distinction, ngl).

rewind

to throw away part of the development, i.e. to assign the head to an earlier revision. it's giving "ctrl+z but for history" โช๐Ÿ’€

SCM

source code management (tool). that's the category, and yes, git is one of them โœจ

SHA-1

"Secure Hash Algorithm 1" โ€” a cryptographic hash function. in the context of Git it's used as a synonym for object name. lowkey the lore runs deep ๐Ÿ”

shallow clone

mostly a synonym for shallow repository, but the phrase makes it way more explicit that it was created by running the git clone --depth=... command. like, it's telling on itself ๐Ÿš

shallow repository

a shallow repository has an incomplete history โ€” some of its commits have their parents cauterized away. in other words, Git is told to pretend those commits don't have parents, even though the parents are still recorded in the commit object. kinda dark, but okay ๐Ÿซฃ

this is sometimes useful when you only care about the recent history of a project even though the real history recorded upstream is way bigger. you create one by giving the --depth option to git-clone(1), and its history can be deepened later on with git-fetch(1). slay, growth ๐ŸŒฑ

stash entry

an object used to temporarily store the contents of a dirty working directory and the index, for future reuse. it's the "brb putting this aside" object ๐Ÿงบโœจ

submodule

a repository that holds the history of a separate project inside another repository โ€” and that outer one is called the superproject. matryoshka dolls but make it version control ๐Ÿช†

superproject

a repository that references repositories of other projects in its working tree as submodules. the superproject knows about the names of the commit objects of the contained submodules โ€” but it does not hold copies of them. it knows of them, not about them, if you catch my drift ๐Ÿ‘€

symref

symbolic reference: instead of containing the SHA-1 id itself, it's in the format ref: refs/some/thing, and when it's referenced it recursively dereferences to that reference. HEAD is the prime, textbook example of a symref โ€” main character energy, obviously ๐Ÿ‘‘. symbolic references are manipulated with the git-symbolic-ref(1) command.

tag

a ref under the refs/tags/ namespace that points to an object of an arbitrary type (typically a tag points to either a tag object or a commit object). in contrast to a head, a tag is not updated by the commit command โ€” it stays put, periodt ๐Ÿ’…

quick PSA: a Git tag has absolutely nothing to do with a Lisp tag (which, in Git's context, would be called an object type โ€” different thing, don't mix them up). a tag is most typically used to mark a particular point in the commit ancestry chain. little bookmark, big purpose ๐Ÿ”–

tag object

an object containing a ref pointing to another object, which can contain a message just like a commit object does. it can also contain a (PGP) signature โ€” and in that case it's called a "signed tag object" โœ๏ธ๐Ÿ”

topic branch

a regular Git branch that a developer uses to identify a conceptual line of development. since branches are super easy and inexpensive, it's often desirable to have several small branches that each contain very well defined concepts, or small incremental yet related changes. tiny branches, tidy brain ๐Ÿง ๐ŸŒธ

trailer

key-value metadata. trailers are optionally found at the end of a commit message. other communities might call these "footers" or "tags". see git-interpret-trailers(1) ๐Ÿท๏ธ

tree

either a working tree, or a tree object together with the dependent blob and tree objects (i.e. a stored representation of a working tree). yes, one word, two whole meanings, we love a multitasker ๐ŸŒณ

tree object

an object containing a list of file names and modes, along with refs to the associated blob and/or tree objects. a tree is equivalent to a directory. literally the same vibe, different name ๐Ÿ“

tree-ish (also treeish)

a tree object, or an object that can be recursively dereferenced to a tree object. dereferencing a commit object yields the tree object corresponding to that revision's top directory.

the following are all tree-ishes, bestie:

  • a commit-ish
  • a tree object
  • a tag object that points to a tree object
  • a tag object that points to a tag object that points to a tree object
  • etc. (you see the pattern, it's turtles all the way down ๐Ÿข)

unborn

HEAD can point at a branch that doesn't exist yet and doesn't have any commit on it yet โ€” and a branch like that is called an unborn branch. the most typical way users encounter one is by creating a repository from scratch instead of cloning from somewhere else. HEAD would be pointing at the main (or master, depending on your configuration) branch that is yet to be born ๐Ÿ‘ถโœจ

also, some operations can get you onto an unborn branch with their orphan option. surprise, you're on an unborn branch now ๐ŸŽ€

unmerged index

an index which contains unmerged index entries. that's it, that's the whole definition. messy index, unresolved feelings ๐Ÿ˜ตโ€๐Ÿ’ซ

unreachable object

an object which is not reachable from a branch, a tag, or any other reference. it's just floating out there, doing its own thing ๐Ÿช

upstream branch

the default branch that gets merged into the branch in question (or, alternatively, the branch that the branch in question is rebased onto). it's configured via branch.<name>.remote and branch.<name>.merge.

if the upstream branch of A is origin/B, sometimes we say "A is tracking origin/B" ๐Ÿซถ

working tree

the tree of actual checked out files. the working tree normally contains the contents of the HEAD commit's tree, plus any local changes you've made but haven't committed yet. it's your messy little desk, and we respect it ๐Ÿ—‚๏ธ๐Ÿ’–

worktree

a repository can have zero worktrees (i.e. a bare repository) or one or more worktrees attached to it. one "worktree" consists of a "working tree" plus repository metadata โ€” most of that metadata is shared among other worktrees of a single repository, and some of it is maintained separately per worktree (e.g. the index, HEAD and pseudorefs like MERGE_HEAD, per-worktree refs, and the per-worktree configuration file). some things are communal, some things are personal ๐Ÿ”๐Ÿก


โœจ SEE ALSO โœจ


๐Ÿงš GIT ๐Ÿงš

part of the git(1) suite. one big happy family ๐Ÿซถ


๐Ÿ’œ NOTES ๐Ÿ’œ

  1. The Git User's Manual โ€” file:///usr/share/doc/git-doc/user-manual.html

and that's a wrap on the glossary, bestie!! ๐ŸŒˆโญ this page is from Git 2.56.0, dated 2026-09-27, and it's GITGLOSSARY(7) โ€” go forth and drop these terms in the group chat with confidence ๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from