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. ๐ข
head
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.gitignorefile, 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_HEADis written bygit-fetch(1)orgit-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_HEADis written bygit-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
_HEADor is exactly equal toHEAD
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_MERGEBISECT_EXPECTED_REVNOTES_MERGE_PARTIALNOTES_MERGE_REFMERGE_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 โจ
gitdatamodel(7)gittutorial(7)gittutorial-2(7)gitcvs-migration(7)giteveryday(7)- The Git User's Manual[1]
๐ง GIT ๐ง
part of the git(1) suite. one big happy family ๐ซถ
๐ NOTES ๐
- 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
- arch rolling: git 2.56.0-1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms