3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Source: Git 2.41.0.470.gbfce02c22f
10 .TH "GITGLOSSARY" "7" "2023\-07\-27" "Git 2\&.41\&.0\&.470\&.gbfce02" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 gitglossary \- A Git Glossary
37 alternate object database
39 Via the alternates mechanism, a
41 can inherit part of its
43 from another object database, which is called an "alternate"\&.
48 A bare repository is normally an appropriately named
52 suffix that does not have a locally checked\-out copy of any of the files under revision control\&. That is, all of the Git administrative and control files that would normally be present in the hidden
54 sub\-directory are directly present in the
55 \fBrepository\&.git\fR
56 directory instead, and no other files are present and checked out\&. Usually publishers of public repositories make bare repositories available\&.
62 object, e\&.g\&. the contents of a file\&.
67 A "branch" is a line of development\&. The most recent
69 on a branch is referred to as the tip of that branch\&. The tip of the branch is
72 head, which moves forward as additional development is done on the branch\&. A single Git
74 can track an arbitrary number of branches, but your
76 is associated with just one of them (the "current" or "checked out" branch), and
78 points to that branch\&.
89 A list of objects, where each
91 in the list contains a reference to its successor (for example, the successor of a
99 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\&.
104 The action of updating all or part of the
111 object database, and updating the
115 if the whole working tree has been pointed at a new
123 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
125 and to record it based on the tip of the current
134 is clean, if it corresponds to the
136 referenced by the current
137 head\&. Also see "dirty"\&.
142 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
145 As a verb: The action of storing a new snapshot of the project\(cqs state in the Git history, by creating a new commit representing the current state of the
149 to point at the new commit\&.
152 commit graph concept, representations and usage
156 structure formed by the commits in the object database,
158 by branch tips, using their
160 of linked commits\&. This structure is the definitive commit graph\&. The graph can be represented in other ways, e\&.g\&. the
161 "commit\-graph" file\&.
166 The "commit\-graph" (normally hyphenated) file is a supplemental representation of the
168 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\&.
175 which contains the information about a particular
177 parents, committer, author, date and the
179 which corresponds to the top
181 of the stored revision\&.
184 commit\-ish (also committish)
190 that can be recursively dereferenced to a commit object\&. The following are all commit\-ishes: a commit object, a
192 that points to a commit object, a tag object that points to a tag object that points to a commit object, etc\&.
197 Fundamental data structures and utilities of Git\&. Exposes only limited source code management tools\&.
202 Directed acyclic graph\&. The
204 form a directed acyclic graph, because they have parents (directed), and the graph of commit objects is acyclic (there is no
206 which begins and ends with the same
216 even from other unreachable objects; a dangling object has no references to it from any reference or
227 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
231 that isn\(cqt necessarily the tip of any particular branch\&. The HEAD in such a state is called "detached"\&.
233 Note that commands that operate on the history of the current branch (e\&.g\&.
235 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
237 the current branch (e\&.g\&.
238 \fBgit branch \-\-set\-upstream\-to\fR
239 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\&.
244 The list you get with "ls" :\-)
251 is said to be "dirty" if it contains modifications which have not been
261 that introduces changes that do not appear in any
267 A fast\-forward is a special type of
271 and you are "merging" another
272 branch\*(Aqs changes that happen to be a descendant of what you have\&. In such a case, you do not make a new
275 but instead just update your branch to point at the same revision as the branch you are merging\&. This will happen frequently on a
276 remote\-tracking branch
285 means to get the branch\(cqs
288 repository, to find out which objects are missing from the local
289 object database, and to get them, too\&. See also
290 \fBgit-fetch\fR(1)\&.
295 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\&.
309 at the root of a working tree that points at the directory that is the real repository\&.
314 Grafts enables 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
318 has is different from what was recorded when the commit was created\&. Configured via the
319 \fB\&.git/info/grafts\fR
322 Note that the grafts mechanism is outdated and can lead to problems transferring objects between repositories; see
324 for a more flexible and robust system to do the same thing\&.
329 In Git\(cqs context, synonym for
340 branch\&. Heads are stored in a file in
341 \fB$GIT_DIR/refs/heads/\fR
342 directory, except when using packed refs\&. (See
343 \fBgit-pack-refs\fR(1)\&.)
349 branch\&. In more detail: Your
351 is normally derived from the state of the tree referred to by HEAD\&. HEAD is a reference to one of the
353 in your repository, except when using a
354 detached HEAD, in which case it directly references an arbitrary commit\&.
365 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
366 \fB$GIT_DIR/hooks/\fR
367 directory, and are enabled by simply removing the
369 suffix from the filename\&. In earlier versions of Git you had to make them executable\&.
374 A collection of files with stat information, whose contents are stored as objects\&. The index is a stored version of your
375 working tree\&. Truth be told, it can also contain a second, and even a third version of a working tree, which are used when
381 The information regarding a particular file, stored in the
382 index\&. An index entry can be unmerged, if a
384 was started, but not yet finished (i\&.e\&. if the index contains multiple versions of that file)\&.
389 The default development
390 branch\&. Whenever you create a Git
391 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\&.
396 As a verb: To bring the contents of another
398 (possibly from an external
399 repository) into the current branch\&. In the case where the merged\-in branch is from a different repository, this is done by first
401 the remote branch and then merging the result into the current branch\&. This combination of fetch and merge operations is called a
402 pull\&. Merging is performed by an automatic process that identifies changes made since the branches diverged, and then applies all those changes together\&. In cases where changes conflict, manual intervention may be required to complete the merge\&.
404 As a noun: unless it is a
405 fast\-forward, a successful merge results in the creation of a new
407 representing the result of the merge, and having as
409 the tips of the merged
410 branches\&. This commit is referred to as a "merge commit", or sometimes just a "merge"\&.
415 The unit of storage in Git\&. It is uniquely identified by the
417 of its contents\&. Consequently, an object cannot be changed\&.
422 Stores a set of "objects", and an individual
425 object name\&. The objects usually live in
426 \fB$GIT_DIR/objects/\fR\&.
429 object identifier (oid)
437 The unique identifier of an
438 object\&. The object name is usually represented by a 40 character hexadecimal string\&. Also colloquially called
444 One of the identifiers "commit", "tree", "tag" or "blob" describing the type of an
459 repository\&. Most projects have at least one upstream project which they track\&. By default
461 is used for that purpose\&. New upstream updates will be fetched into
462 remote\-tracking branches
463 named origin/name\-of\-upstream\-branch, which you can see using
464 \fBgit branch \-r\fR\&.
469 Only update and add files to the working directory, but don\(cqt delete them, similar to how
471 would update the contents in the destination directory\&. This is the default mode in a
473 when checking out files from the
476 tree\-ish\&. In contrast, no\-overlay mode also deletes tracked files not present in the source, similar to
477 \fIrsync \-\-delete\fR\&.
482 A set of objects which have been compressed into one file (to save space or to transmit them efficiently)\&.
487 The list of identifiers, and other information, of the objects in a
488 pack, to assist in efficiently accessing the contents of a pack\&.
493 Pattern used to limit paths in Git commands\&.
495 Pathspecs are 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\&. See the documentation of each command for whether paths are relative to the current directory or toplevel\&. The pathspec syntax is as follows:
505 any path matches itself
516 the pathspec up to the last slash represents a directory prefix\&. The scope of that pathspec is limited to that subtree\&.
527 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,
532 match directory separators\&.
535 For example, Documentation/*\&.jpg will match all \&.jpg files in the Documentation subtree, including Documentation/chapter_1/figure_1\&.jpg\&.
537 A pathspec that begins with a colon
539 has special meaning\&. In the short form, the leading colon
541 is followed by zero or more "magic signature" letters (which optionally is terminated by another colon
542 \fB:\fR), 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 does not belong to "magic signature" symbol set and is not a colon\&.
544 In the long form, the leading colon
546 is followed by an open parenthesis
547 \fB(\fR, a comma\-separated list of zero or more "magic words", and a close parentheses
548 \fB)\fR, and the remainder is the pattern to match against the path\&.
550 A pathspec with only a colon means "there is no pathspec"\&. This form should not be combined with other pathspec\&.
557 \fB/\fR) makes the pattern match from the root of the working tree, even when you are running the command from inside a subdirectory\&.
562 Wildcards in the pattern such as
566 are treated as literal characters\&.
571 Case insensitive match\&.
576 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"\&.
578 Two consecutive asterisks ("\fB**\fR") in patterns matched against full pathname may have special meaning:
588 A leading "\fB**\fR" followed by a slash means match in all directories\&. For example, "\fB**/foo\fR" matches file or directory "\fBfoo\fR" anywhere, the same as pattern "\fBfoo\fR"\&. "\fB**/foo/bar\fR" matches file or directory "\fBbar\fR" anywhere that is directly under directory "\fBfoo\fR"\&.
599 A trailing "\fB/**\fR" matches everything inside\&. For example, "\fBabc/**\fR" matches all files inside directory "abc", relative to the location of the
601 file, with infinite depth\&.
612 A slash followed by two consecutive asterisks then a slash matches zero or more directories\&. For example, "\fBa/**/b\fR" matches "\fBa/b\fR", "\fBa/x/b\fR", "\fBa/x/y/b\fR" and so on\&.
623 Other consecutive asterisks are considered invalid\&.
625 Glob magic is incompatible with literal magic\&.
633 comes a space separated list of "attribute requirements", all of which 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
634 \fBgitattributes\fR(5)\&.
636 Each of the attribute requirements for the path takes one of these forms:
646 "\fBATTR\fR" requires that the attribute
659 "\fB\-ATTR\fR" requires that the attribute
672 "\fBATTR=VALUE\fR" requires that the attribute
686 "\fB!ATTR\fR" requires that the attribute
690 Note that when matching against a tree object, attributes are still obtained from working tree, not from the given tree object\&.
696 After a path matches any non\-exclude pathspec, it will be run through all exclude pathspecs (magic signature:
699 \fB^\fR)\&. If it matches, the path is ignored\&. When there is no non\-exclude pathspec, the exclusion is applied to the result set as if invoked without any pathspec\&.
707 contains a (possibly empty) list of the logical predecessor(s) in the line of development, i\&.e\&. its parents\&.
714 refers to an option to the diffcore routines that help select changes that add or delete a given text string\&. With the
715 \fB\-\-pickaxe\-all\fR
716 option, it can be used to view the full
718 that introduced or removed, say, a particular line of text\&. See
730 Cute name for programs and program suites depending on
731 core Git, presenting a high level access to core Git\&. Porcelains expose more of a
739 Refs that are per\-worktree, rather than global\&. This is presently only
741 and any refs that start with
742 \fBrefs/bisect/\fR, but might later include other unusual refs\&.
747 Pseudorefs are a class of files under
749 which behave like refs for the purposes of rev\-parse, but which are treated specially by git\&. Pseudorefs both have names that are all\-caps, and always start with a line consisting of a
751 followed by whitespace\&. So, HEAD is not a pseudoref, because it is sometimes a symbolic ref\&. They might optionally contain some additional data\&.
754 \fBCHERRY_PICK_HEAD\fR
755 are examples\&. Unlike
756 per\-worktree refs, these files cannot be symbolic refs, and never have reflogs\&. They also cannot be updated through the normal ref update machinery\&. Instead, they are updated by directly writing to the files\&. However, they can be read as if they were refs, so
757 \fBgit rev\-parse MERGE_HEAD\fR
777 means to get the branch\(cqs
780 repository, find out if it is an ancestor to the branch\(cqs local head ref, and in that case, putting all objects, which are
782 from the local head ref, and which are missing from the remote repository, into the remote
783 object database, and updating the remote head ref\&. If the remote
785 is not an ancestor to the local head, the push fails\&.
790 All of the ancestors of a given
792 are said to be "reachable" from that commit\&. More generally, one
794 is reachable from another if we can reach the one from the other by a
798 to whatever they tag,
800 to their parents or trees, and
809 Reachability bitmaps store information about the
811 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\&. The bitmap file may belong to either one pack, or the repository\(cqs multi\-pack index (if it exists)\&.
816 To reapply a series of changes from a
818 to a different base, and reset the
820 of that branch to the result\&.
825 A name that begins with
828 \fBrefs/heads/master\fR) that points to an
830 or another ref (the latter is called a
831 symbolic ref)\&. For convenience, a ref can sometimes be abbreviated when used as an argument to a Git command; see
832 \fBgitrevisions\fR(7)
833 for details\&. Refs are stored in the
836 The ref namespace is hierarchical\&. Different subhierarchies are used for different purposes (e\&.g\&. the
838 hierarchy is used to represent local branches)\&.
840 There are a few special\-purpose refs that do not begin with
841 \fBrefs/\fR\&. The most notable example is
847 A reflog shows the local "history" of a ref\&. In other words, it can tell you what the 3rd last revision in
849 repository was, and what was the current state in
851 repository, yesterday 9:14pm\&. See
858 A "refspec" is used by
862 to describe the mapping between remote
871 which is used to track the same project but resides somewhere else\&. To communicate with remotes, see
877 remote\-tracking branch
881 that is used to follow changes from another
882 repository\&. It typically looks like
883 \fIrefs/remotes/foo/bar\fR
884 (indicating that it tracks a branch named
887 \fIfoo\fR), and matches the right\-hand\-side of a configured fetch
888 refspec\&. A remote\-tracking branch should not contain direct modifications or have local commits made to it\&.
897 containing all objects which are
899 from the refs, possibly accompanied by meta data from one or more
900 porcelains\&. A repository can share an object database with other repositories via
901 alternates mechanism\&.
906 The action of fixing up manually what a failed automatic
920 To throw away part of the development, i\&.e\&. to assign the
928 Source code management (tool)\&.
933 "Secure Hash Algorithm 1"; a cryptographic hash function\&. In the context of Git used as a synonym for
941 but the phrase makes it more explicit that it was created by running
942 \fBgit clone \-\-depth=\&.\&.\&.\fR
950 has an incomplete history some of whose
954 cauterized away (in other words, Git is told to pretend that these commits do not have the parents, even though they are recorded in the
955 commit object)\&. This is sometimes useful when you are interested only in the recent history of a project even though the real history recorded in the upstream is much larger\&. A shallow repository is created by giving the
958 \fBgit-clone\fR(1), and its history can be later deepened with
959 \fBgit-fetch\fR(1)\&.
966 used to temporarily store the contents of a
968 working directory and the index for future reuse\&.
975 that holds the history of a separate project inside another repository (the latter of which is called
983 that references repositories of other projects in its working tree as
984 submodules\&. The superproject knows about the names of (but does not hold copies of) commit objects of the contained submodules\&.
989 Symbolic reference: instead of containing the
991 id itself, it is of the format
992 \fIref: refs/some/thing\fR
993 and when referenced, it recursively dereferences to this reference\&.
995 is a prime example of a symref\&. Symbolic references are manipulated with the
996 \fBgit-symbolic-ref\fR(1)
1006 namespace that points to an object of an arbitrary type (typically a tag points to either a
1009 commit object)\&. In contrast to a
1010 head, a tag is not updated by the
1012 command\&. A Git tag has nothing to do with a Lisp tag (which would be called an
1014 in Git\(cqs context)\&. A tag is most typically used to mark a particular point in the commit ancestry
1024 pointing to another object, which can contain a message just like a
1025 commit object\&. It can also contain a (PGP) signature, in which case it is called a "signed tag object"\&.
1032 that is used by a developer to identify a conceptual line of development\&. Since branches are very easy and inexpensive, it is often desirable to have several small branches that each contain very well defined concepts or small incremental yet related changes\&.
1040 together with the dependent
1042 and tree objects (i\&.e\&. a stored representation of a working tree)\&.
1049 containing a list of file names and modes along with refs to the associated blob and/or tree objects\&. A
1055 tree\-ish (also treeish)
1061 that can be recursively dereferenced to a tree object\&. Dereferencing a
1063 yields the tree object corresponding to the
1065 directory\&. The following are all tree\-ishes: a
1066 commit\-ish, a tree object, a
1068 that points to a tree object, a tag object that points to a tag object that points to a tree object, etc\&.
1075 which contains unmerged
1087 tag, or any other reference\&.
1094 that is merged into the branch in question (or the branch in question is rebased onto)\&. It is configured via branch\&.<name>\&.remote and branch\&.<name>\&.merge\&. If the upstream branch of
1098 sometimes we say "\fIA\fR
1105 The tree of actual checked out files\&. The working tree normally contains the contents of the
1107 commit\(cqs tree, plus any local changes that you have made but not yet committed\&.
1112 A repository can have zero (i\&.e\&. bare repository) or one or more worktrees attached to it\&. One "worktree" consists of a "working tree" and repository metadata, most of which are shared among other worktrees of a single repository, and some of which are maintained separately per worktree (e\&.g\&. the index, HEAD and pseudorefs like MERGE_HEAD, per\-worktree refs and per\-worktree configuration file)\&.
1116 \fBgittutorial\fR(7), \fBgittutorial-2\fR(7), \fBgitcvs-migration\fR(7), \fBgiteveryday\fR(7), \m[blue]\fBThe Git User\(cqs Manual\fR\m[]\&\s-2\u[1]\d\s+2
1119 Part of the \fBgit\fR(1) suite
1122 The Git User\(cqs Manual
1124 \%git-htmldocs/user-manual.html