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.44.0.53.g0f9d4d28b7
10 .TH "GITGLOSSARY" "7" "2024\-02\-27" "Git 2\&.44\&.0\&.53\&.g0f9d4d2" "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
192 to a commit object\&. The following are all commit\-ishes: a commit object, a
194 that points to a commit object, a tag object that points to a tag object that points to a commit object, etc\&.
199 Fundamental data structures and utilities of Git\&. Exposes only limited source code management tools\&.
204 Directed acyclic graph\&. The
206 form a directed acyclic graph, because they have parents (directed), and the graph of commit objects is acyclic (there is no
208 which begins and ends with the same
218 even from other unreachable objects; a dangling object has no references to it from any reference or
227 symbolic ref: the action of accessing the
229 pointed at by a symbolic ref\&. Recursive dereferencing involves repeating the aforementioned process on the resulting ref until a non\-symbolic reference is found\&.
232 tag object: the action of accessing the
234 a tag points at\&. Tags are recursively dereferenced by repeating the operation on the result object until the result has either a specified
236 (where applicable) or any non\-"tag" object type\&. A synonym for "recursive dereference" in the context of tags is "peel"\&.
239 commit object: the action of accessing the commit\(cqs tree object\&. Commits cannot be dereferenced recursively\&.
241 Unless otherwise specified, "dereferencing" as it used in the context of Git commands or protocols is implicitly recursive\&.
249 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
253 that isn\(cqt necessarily the tip of any particular branch\&. The HEAD in such a state is called "detached"\&.
255 Note that commands that operate on the history of the current branch (e\&.g\&.
257 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
259 the current branch (e\&.g\&.
260 \fBgit branch \-\-set\-upstream\-to\fR
261 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\&.
266 The list you get with "ls" :\-)
273 is said to be "dirty" if it contains modifications which have not been
283 that introduces changes that do not appear in any
289 A fast\-forward is a special type of
293 and you are "merging" another
294 branch\*(Aqs changes that happen to be a descendant of what you have\&. In such a case, you do not make a new
297 but instead just update your branch to point at the same revision as the branch you are merging\&. This will happen frequently on a
298 remote\-tracking branch
307 means to get the branch\(cqs
310 repository, to find out which objects are missing from the local
311 object database, and to get them, too\&. See also
312 \fBgit-fetch\fR(1)\&.
317 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\&.
331 at the root of a working tree that points at the directory that is the real repository\&. For proper use see
332 \fBgit-worktree\fR(1)
334 \fBgit-submodule\fR(1)\&. For syntax see
335 \fBgitrepository-layout\fR(5)\&.
340 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
344 has is different from what was recorded when the commit was created\&. Configured via the
345 \fB\&.git/info/grafts\fR
348 Note that the grafts mechanism is outdated and can lead to problems transferring objects between repositories; see
350 for a more flexible and robust system to do the same thing\&.
355 In Git\(cqs context, synonym for
366 branch\&. Heads are stored in a file in
367 \fB$GIT_DIR/refs/heads/\fR
368 directory, except when using packed refs\&. (See
369 \fBgit-pack-refs\fR(1)\&.)
375 branch\&. In more detail: Your
377 is normally derived from the state of the tree referred to by HEAD\&. HEAD is a reference to one of the
379 in your repository, except when using a
380 detached HEAD, in which case it directly references an arbitrary commit\&.
391 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
392 \fB$GIT_DIR/hooks/\fR
393 directory, and are enabled by simply removing the
395 suffix from the filename\&. In earlier versions of Git you had to make them executable\&.
400 A collection of files with stat information, whose contents are stored as objects\&. The index is a stored version of your
401 working tree\&. Truth be told, it can also contain a second, and even a third version of a working tree, which are used when
407 The information regarding a particular file, stored in the
408 index\&. An index entry can be unmerged, if a
410 was started, but not yet finished (i\&.e\&. if the index contains multiple versions of that file)\&.
415 The default development
416 branch\&. Whenever you create a Git
417 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\&.
422 As a verb: To bring the contents of another
424 (possibly from an external
425 repository) into the current branch\&. In the case where the merged\-in branch is from a different repository, this is done by first
427 the remote branch and then merging the result into the current branch\&. This combination of fetch and merge operations is called a
428 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\&.
430 As a noun: unless it is a
431 fast\-forward, a successful merge results in the creation of a new
433 representing the result of the merge, and having as
435 the tips of the merged
436 branches\&. This commit is referred to as a "merge commit", or sometimes just a "merge"\&.
441 The unit of storage in Git\&. It is uniquely identified by the
443 of its contents\&. Consequently, an object cannot be changed\&.
448 Stores a set of "objects", and an individual
451 object name\&. The objects usually live in
452 \fB$GIT_DIR/objects/\fR\&.
455 object identifier (oid)
463 The unique identifier of an
464 object\&. The object name is usually represented by a 40 character hexadecimal string\&. Also colloquially called
470 One of the identifiers "commit", "tree", "tag" or "blob" describing the type of an
484 The act of getting on a
486 that does not exist yet (i\&.e\&., an
488 branch)\&. After such an operation, the commit first created becomes a commit without a parent, starting a new history\&.
494 repository\&. Most projects have at least one upstream project which they track\&. By default
496 is used for that purpose\&. New upstream updates will be fetched into
497 remote\-tracking branches
498 named origin/name\-of\-upstream\-branch, which you can see using
499 \fBgit branch \-r\fR\&.
504 Only update and add files to the working directory, but don\(cqt delete them, similar to how
506 would update the contents in the destination directory\&. This is the default mode in a
508 when checking out files from the
511 tree\-ish\&. In contrast, no\-overlay mode also deletes tracked files not present in the source, similar to
512 \fIrsync \-\-delete\fR\&.
517 A set of objects which have been compressed into one file (to save space or to transmit them efficiently)\&.
522 The list of identifiers, and other information, of the objects in a
523 pack, to assist in efficiently accessing the contents of a pack\&.
528 Pattern used to limit paths in Git commands\&.
530 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:
540 any path matches itself
551 the pathspec up to the last slash represents a directory prefix\&. The scope of that pathspec is limited to that subtree\&.
562 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,
567 match directory separators\&.
570 For example, Documentation/*\&.jpg will match all \&.jpg files in the Documentation subtree, including Documentation/chapter_1/figure_1\&.jpg\&.
572 A pathspec that begins with a colon
574 has special meaning\&. In the short form, the leading colon
576 is followed by zero or more "magic signature" letters (which optionally is terminated by another colon
577 \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\&.
579 In the long form, the leading colon
581 is followed by an open parenthesis
582 \fB(\fR, a comma\-separated list of zero or more "magic words", and a close parentheses
583 \fB)\fR, and the remainder is the pattern to match against the path\&.
585 A pathspec with only a colon means "there is no pathspec"\&. This form should not be combined with other pathspec\&.
592 \fB/\fR) makes the pattern match from the root of the working tree, even when you are running the command from inside a subdirectory\&.
597 Wildcards in the pattern such as
601 are treated as literal characters\&.
606 Case insensitive match\&.
611 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"\&.
613 Two consecutive asterisks ("\fB**\fR") in patterns matched against full pathname may have special meaning:
623 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"\&.
634 A trailing "\fB/**\fR" matches everything inside\&. For example, "\fBabc/**\fR" matches all files inside directory "abc", relative to the location of the
636 file, with infinite depth\&.
647 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\&.
658 Other consecutive asterisks are considered invalid\&.
660 Glob magic is incompatible with literal magic\&.
668 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
669 \fBgitattributes\fR(5)\&.
671 Each of the attribute requirements for the path takes one of these forms:
681 "\fBATTR\fR" requires that the attribute
694 "\fB\-ATTR\fR" requires that the attribute
707 "\fBATTR=VALUE\fR" requires that the attribute
721 "\fB!ATTR\fR" requires that the attribute
725 Note that when matching against a tree object, attributes are still obtained from working tree, not from the given tree object\&.
731 After a path matches any non\-exclude pathspec, it will be run through all exclude pathspecs (magic signature:
734 \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\&.
742 contains a (possibly empty) list of the logical predecessor(s) in the line of development, i\&.e\&. its parents\&.
747 The action of recursively
757 refers to an option to the diffcore routines that help select changes that add or delete a given text string\&. With the
758 \fB\-\-pickaxe\-all\fR
759 option, it can be used to view the full
761 that introduced or removed, say, a particular line of text\&. See
773 Cute name for programs and program suites depending on
774 core Git, presenting a high level access to core Git\&. Porcelains expose more of a
782 Refs that are per\-worktree, rather than global\&. This is presently only
784 and any refs that start with
785 \fBrefs/bisect/\fR, but might later include other unusual refs\&.
790 Pseudorefs are a class of files under
792 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
794 followed by whitespace\&. So, HEAD is not a pseudoref, because it is sometimes a symbolic ref\&. They might optionally contain some additional data\&.
797 \fBCHERRY_PICK_HEAD\fR
798 are examples\&. Unlike
799 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
800 \fBgit rev\-parse MERGE_HEAD\fR
820 means to get the branch\(cqs
823 repository, find out if it is an ancestor to the branch\(cqs local head ref, and in that case, putting all objects, which are
825 from the local head ref, and which are missing from the remote repository, into the remote
826 object database, and updating the remote head ref\&. If the remote
828 is not an ancestor to the local head, the push fails\&.
833 All of the ancestors of a given
835 are said to be "reachable" from that commit\&. More generally, one
837 is reachable from another if we can reach the one from the other by a
841 to whatever they tag,
843 to their parents or trees, and
852 Reachability bitmaps store information about the
854 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)\&.
859 To reapply a series of changes from a
861 to a different base, and reset the
863 of that branch to the result\&.
868 A name that begins with
871 \fBrefs/heads/master\fR) that points to an
873 or another ref (the latter is called a
874 symbolic ref)\&. For convenience, a ref can sometimes be abbreviated when used as an argument to a Git command; see
875 \fBgitrevisions\fR(7)
876 for details\&. Refs are stored in the
879 The ref namespace is hierarchical\&. Different subhierarchies are used for different purposes (e\&.g\&. the
881 hierarchy is used to represent local branches)\&.
883 There are a few special\-purpose refs that do not begin with
884 \fBrefs/\fR\&. The most notable example is
890 A reflog shows the local "history" of a ref\&. In other words, it can tell you what the 3rd last revision in
892 repository was, and what was the current state in
894 repository, yesterday 9:14pm\&. See
901 A "refspec" is used by
905 to describe the mapping between remote
914 which is used to track the same project but resides somewhere else\&. To communicate with remotes, see
920 remote\-tracking branch
924 that is used to follow changes from another
925 repository\&. It typically looks like
926 \fIrefs/remotes/foo/bar\fR
927 (indicating that it tracks a branch named
930 \fIfoo\fR), and matches the right\-hand\-side of a configured fetch
931 refspec\&. A remote\-tracking branch should not contain direct modifications or have local commits made to it\&.
940 containing all objects which are
942 from the refs, possibly accompanied by meta data from one or more
943 porcelains\&. A repository can share an object database with other repositories via
944 alternates mechanism\&.
949 The action of fixing up manually what a failed automatic
963 To throw away part of the development, i\&.e\&. to assign the
971 Source code management (tool)\&.
976 "Secure Hash Algorithm 1"; a cryptographic hash function\&. In the context of Git used as a synonym for
984 but the phrase makes it more explicit that it was created by running
985 \fBgit clone \-\-depth=\&.\&.\&.\fR
993 has an incomplete history some of whose
997 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
998 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
1001 \fBgit-clone\fR(1), and its history can be later deepened with
1002 \fBgit-fetch\fR(1)\&.
1009 used to temporarily store the contents of a
1011 working directory and the index for future reuse\&.
1016 A ref that has different semantics than normal refs\&. These refs can be accessed via normal Git commands but may not behave the same as a normal ref in some cases\&.
1018 The following special refs are known to Git:
1022 \h'-04'\(bu\h'+03'\c
1028 "\fBFETCH_HEAD\fR" is written by
1031 \fBgit-pull\fR(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\&.
1036 \h'-04'\(bu\h'+03'\c
1042 "\fBMERGE_HEAD\fR" is written by
1044 when resolving merge conflicts\&. It contains all commit IDs which are being merged\&.
1052 that holds the history of a separate project inside another repository (the latter of which is called
1060 that references repositories of other projects in its working tree as
1061 submodules\&. The superproject knows about the names of (but does not hold copies of) commit objects of the contained submodules\&.
1066 Symbolic reference: instead of containing the
1068 id itself, it is of the format
1069 \fIref: refs/some/thing\fR
1070 and when referenced, it recursively
1072 to this reference\&.
1074 is a prime example of a symref\&. Symbolic references are manipulated with the
1075 \fBgit-symbolic-ref\fR(1)
1085 namespace that points to an object of an arbitrary type (typically a tag points to either a
1088 commit object)\&. In contrast to a
1089 head, a tag is not updated by the
1091 command\&. A Git tag has nothing to do with a Lisp tag (which would be called an
1093 in Git\(cqs context)\&. A tag is most typically used to mark a particular point in the commit ancestry
1103 pointing to another object, which can contain a message just like a
1104 commit object\&. It can also contain a (PGP) signature, in which case it is called a "signed tag object"\&.
1111 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\&.
1119 together with the dependent
1121 and tree objects (i\&.e\&. a stored representation of a working tree)\&.
1128 containing a list of file names and modes along with refs to the associated blob and/or tree objects\&. A
1134 tree\-ish (also treeish)
1140 that can be recursively
1142 to a tree object\&. Dereferencing a
1144 yields the tree object corresponding to the
1146 directory\&. The following are all tree\-ishes: a
1147 commit\-ish, a tree object, a
1149 that points to a tree object, a tag object that points to a tag object that points to a tree object, etc\&.
1158 that does not yet exist and that does not have any commit on it yet, and such a branch is called an unborn branch\&. The most typical way users encounter an unborn branch is by creating a repository anew without cloning from elsewhere\&. The HEAD would point at the
1161 \fImaster\fR, depending on your configuration) branch that is yet to be born\&. Also some operations can get you on an unborn branch with their
1170 which contains unmerged
1182 tag, or any other reference\&.
1189 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
1193 sometimes we say "\fIA\fR
1200 The tree of actual checked out files\&. The working tree normally contains the contents of the
1202 commit\(cqs tree, plus any local changes that you have made but not yet committed\&.
1207 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)\&.
1211 \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
1214 Part of the \fBgit\fR(1) suite
1217 The Git User\(cqs Manual
1219 \%git-htmldocs/user-manual.html