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.38.0.rc1.6.g4fd6c5e444
10 .TH "GITGLOSSARY" "7" "09/23/2022" "Git 2\&.38\&.0\&.rc1\&.6\&.g4f" "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 referenced by a branch
70 head, which moves forward as additional development is done on the branch\&. A single Git
72 can track an arbitrary number of branches, but your
74 is associated with just one of them (the "current" or "checked out" branch), and
76 points to that branch\&.
87 A list of objects, where each
89 in the list contains a reference to its successor (for example, the successor of a
97 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\&.
102 The action of updating all or part of the
109 object database, and updating the
113 if the whole working tree has been pointed at a new
121 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
123 and to record it based on the tip of the current
132 is clean, if it corresponds to the
134 referenced by the current
135 head\&. Also see "dirty"\&.
140 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
143 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
147 to point at the new commit\&.
154 which contains the information about a particular
156 parents, committer, author, date and the
158 which corresponds to the top
160 of the stored revision\&.
163 commit\-ish (also committish)
169 that can be recursively dereferenced to a commit object\&. The following are all commit\-ishes: a commit object, a
171 that points to a commit object, a tag object that points to a tag object that points to a commit object, etc\&.
176 Fundamental data structures and utilities of Git\&. Exposes only limited source code management tools\&.
181 Directed acyclic graph\&. The
183 form a directed acyclic graph, because they have parents (directed), and the graph of commit objects is acyclic (there is no
185 which begins and ends with the same
195 even from other unreachable objects; a dangling object has no references to it from any reference or
206 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
210 that isn\(cqt necessarily the tip of any particular branch\&. The HEAD in such a state is called "detached"\&.
212 Note that commands that operate on the history of the current branch (e\&.g\&.
214 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
216 the current branch (e\&.g\&.
217 \fBgit branch \-\-set\-upstream\-to\fR
218 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\&.
223 The list you get with "ls" :\-)
230 is said to be "dirty" if it contains modifications which have not been
240 that introduces changes that do not appear in any
246 A fast\-forward is a special type of
250 and you are "merging" another
251 branch\(aqs changes that happen to be a descendant of what you have\&. In such a case, you do not make a new
254 but instead just update your branch to point at the same revision as the branch you are merging\&. This will happen frequently on a
255 remote\-tracking branch
264 means to get the branch\(cqs
267 repository, to find out which objects are missing from the local
268 object database, and to get them, too\&. See also
269 \fBgit-fetch\fR(1)\&.
274 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\&.
288 at the root of a working tree that points at the directory that is the real repository\&.
293 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
297 has is different from what was recorded when the commit was created\&. Configured via the
298 \fB\&.git/info/grafts\fR
301 Note that the grafts mechanism is outdated and can lead to problems transferring objects between repositories; see
303 for a more flexible and robust system to do the same thing\&.
308 In Git\(cqs context, synonym for
319 branch\&. Heads are stored in a file in
320 \fB$GIT_DIR/refs/heads/\fR
321 directory, except when using packed refs\&. (See
322 \fBgit-pack-refs\fR(1)\&.)
328 branch\&. In more detail: Your
330 is normally derived from the state of the tree referred to by HEAD\&. HEAD is a reference to one of the
332 in your repository, except when using a
333 detached HEAD, in which case it directly references an arbitrary commit\&.
344 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
345 \fB$GIT_DIR/hooks/\fR
346 directory, and are enabled by simply removing the
348 suffix from the filename\&. In earlier versions of Git you had to make them executable\&.
353 A collection of files with stat information, whose contents are stored as objects\&. The index is a stored version of your
354 working tree\&. Truth be told, it can also contain a second, and even a third version of a working tree, which are used when
360 The information regarding a particular file, stored in the
361 index\&. An index entry can be unmerged, if a
363 was started, but not yet finished (i\&.e\&. if the index contains multiple versions of that file)\&.
368 The default development
369 branch\&. Whenever you create a Git
370 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\&.
375 As a verb: To bring the contents of another
377 (possibly from an external
378 repository) into the current branch\&. In the case where the merged\-in branch is from a different repository, this is done by first
380 the remote branch and then merging the result into the current branch\&. This combination of fetch and merge operations is called a
381 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\&.
383 As a noun: unless it is a
384 fast\-forward, a successful merge results in the creation of a new
386 representing the result of the merge, and having as
388 the tips of the merged
389 branches\&. This commit is referred to as a "merge commit", or sometimes just a "merge"\&.
394 The unit of storage in Git\&. It is uniquely identified by the
396 of its contents\&. Consequently, an object cannot be changed\&.
401 Stores a set of "objects", and an individual
404 object name\&. The objects usually live in
405 \fB$GIT_DIR/objects/\fR\&.
416 The unique identifier of an
417 object\&. The object name is usually represented by a 40 character hexadecimal string\&. Also colloquially called
423 One of the identifiers "commit", "tree", "tag" or "blob" describing the type of an
438 repository\&. Most projects have at least one upstream project which they track\&. By default
440 is used for that purpose\&. New upstream updates will be fetched into
441 remote\-tracking branches
442 named origin/name\-of\-upstream\-branch, which you can see using
443 \fBgit branch \-r\fR\&.
448 Only update and add files to the working directory, but don\(cqt delete them, similar to how
450 would update the contents in the destination directory\&. This is the default mode in a
452 when checking out files from the
455 tree\-ish\&. In contrast, no\-overlay mode also deletes tracked files not present in the source, similar to
456 \fIrsync \-\-delete\fR\&.
461 A set of objects which have been compressed into one file (to save space or to transmit them efficiently)\&.
466 The list of identifiers, and other information, of the objects in a
467 pack, to assist in efficiently accessing the contents of a pack\&.
472 Pattern used to limit paths in Git commands\&.
474 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:
484 any path matches itself
495 the pathspec up to the last slash represents a directory prefix\&. The scope of that pathspec is limited to that subtree\&.
506 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,
511 match directory separators\&.
514 For example, Documentation/*\&.jpg will match all \&.jpg files in the Documentation subtree, including Documentation/chapter_1/figure_1\&.jpg\&.
516 A pathspec that begins with a colon
518 has special meaning\&. In the short form, the leading colon
520 is followed by zero or more "magic signature" letters (which optionally is terminated by another colon
521 \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\&.
523 In the long form, the leading colon
525 is followed by an open parenthesis
526 \fB(\fR, a comma\-separated list of zero or more "magic words", and a close parentheses
527 \fB)\fR, and the remainder is the pattern to match against the path\&.
529 A pathspec with only a colon means "there is no pathspec"\&. This form should not be combined with other pathspec\&.
536 \fB/\fR) makes the pattern match from the root of the working tree, even when you are running the command from inside a subdirectory\&.
541 Wildcards in the pattern such as
545 are treated as literal characters\&.
550 Case insensitive match\&.
555 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"\&.
557 Two consecutive asterisks ("\fB**\fR") in patterns matched against full pathname may have special meaning:
567 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"\&.
578 A trailing "\fB/**\fR" matches everything inside\&. For example, "\fBabc/**\fR" matches all files inside directory "abc", relative to the location of the
580 file, with infinite depth\&.
591 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\&.
602 Other consecutive asterisks are considered invalid\&.
604 Glob magic is incompatible with literal magic\&.
612 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
613 \fBgitattributes\fR(5)\&.
615 Each of the attribute requirements for the path takes one of these forms:
625 "\fBATTR\fR" requires that the attribute
638 "\fB\-ATTR\fR" requires that the attribute
651 "\fBATTR=VALUE\fR" requires that the attribute
665 "\fB!ATTR\fR" requires that the attribute
669 Note that when matching against a tree object, attributes are still obtained from working tree, not from the given tree object\&.
675 After a path matches any non\-exclude pathspec, it will be run through all exclude pathspecs (magic signature:
678 \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\&.
686 contains a (possibly empty) list of the logical predecessor(s) in the line of development, i\&.e\&. its parents\&.
693 refers to an option to the diffcore routines that help select changes that add or delete a given text string\&. With the
694 \fB\-\-pickaxe\-all\fR
695 option, it can be used to view the full
697 that introduced or removed, say, a particular line of text\&. See
709 Cute name for programs and program suites depending on
710 core Git, presenting a high level access to core Git\&. Porcelains expose more of a
718 Refs that are per\-worktree, rather than global\&. This is presently only
720 and any refs that start with
721 \fBrefs/bisect/\fR, but might later include other unusual refs\&.
726 Pseudorefs are a class of files under
728 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
730 followed by whitespace\&. So, HEAD is not a pseudoref, because it is sometimes a symbolic ref\&. They might optionally contain some additional data\&.
733 \fBCHERRY_PICK_HEAD\fR
734 are examples\&. Unlike
735 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
736 \fBgit rev\-parse MERGE_HEAD\fR
756 means to get the branch\(cqs
759 repository, find out if it is an ancestor to the branch\(cqs local head ref, and in that case, putting all objects, which are
761 from the local head ref, and which are missing from the remote repository, into the remote
762 object database, and updating the remote head ref\&. If the remote
764 is not an ancestor to the local head, the push fails\&.
769 All of the ancestors of a given
771 are said to be "reachable" from that commit\&. More generally, one
773 is reachable from another if we can reach the one from the other by a
777 to whatever they tag,
779 to their parents or trees, and
788 To reapply a series of changes from a
790 to a different base, and reset the
792 of that branch to the result\&.
797 A name that begins with
800 \fBrefs/heads/master\fR) that points to an
802 or another ref (the latter is called a
803 symbolic ref)\&. For convenience, a ref can sometimes be abbreviated when used as an argument to a Git command; see
804 \fBgitrevisions\fR(7)
805 for details\&. Refs are stored in the
808 The ref namespace is hierarchical\&. Different subhierarchies are used for different purposes (e\&.g\&. the
810 hierarchy is used to represent local branches)\&.
812 There are a few special\-purpose refs that do not begin with
813 \fBrefs/\fR\&. The most notable example is
819 A reflog shows the local "history" of a ref\&. In other words, it can tell you what the 3rd last revision in
821 repository was, and what was the current state in
823 repository, yesterday 9:14pm\&. See
830 A "refspec" is used by
834 to describe the mapping between remote
843 which is used to track the same project but resides somewhere else\&. To communicate with remotes, see
849 remote\-tracking branch
853 that is used to follow changes from another
854 repository\&. It typically looks like
855 \fIrefs/remotes/foo/bar\fR
856 (indicating that it tracks a branch named
859 \fIfoo\fR), and matches the right\-hand\-side of a configured fetch
860 refspec\&. A remote\-tracking branch should not contain direct modifications or have local commits made to it\&.
869 containing all objects which are
871 from the refs, possibly accompanied by meta data from one or more
872 porcelains\&. A repository can share an object database with other repositories via
873 alternates mechanism\&.
878 The action of fixing up manually what a failed automatic
892 To throw away part of the development, i\&.e\&. to assign the
900 Source code management (tool)\&.
905 "Secure Hash Algorithm 1"; a cryptographic hash function\&. In the context of Git used as a synonym for
913 but the phrase makes it more explicit that it was created by running
914 \fBgit clone \-\-depth=\&.\&.\&.\fR
922 has an incomplete history some of whose
926 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
927 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
930 \fBgit-clone\fR(1), and its history can be later deepened with
931 \fBgit-fetch\fR(1)\&.
938 used to temporarily store the contents of a
940 working directory and the index for future reuse\&.
947 that holds the history of a separate project inside another repository (the latter of which is called
955 that references repositories of other projects in its working tree as
956 submodules\&. The superproject knows about the names of (but does not hold copies of) commit objects of the contained submodules\&.
961 Symbolic reference: instead of containing the
963 id itself, it is of the format
964 \fIref: refs/some/thing\fR
965 and when referenced, it recursively dereferences to this reference\&.
967 is a prime example of a symref\&. Symbolic references are manipulated with the
968 \fBgit-symbolic-ref\fR(1)
978 namespace that points to an object of an arbitrary type (typically a tag points to either a
981 commit object)\&. In contrast to a
982 head, a tag is not updated by the
984 command\&. A Git tag has nothing to do with a Lisp tag (which would be called an
986 in Git\(cqs context)\&. A tag is most typically used to mark a particular point in the commit ancestry
996 pointing to another object, which can contain a message just like a
997 commit object\&. It can also contain a (PGP) signature, in which case it is called a "signed tag object"\&.
1004 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\&.
1012 together with the dependent
1014 and tree objects (i\&.e\&. a stored representation of a working tree)\&.
1021 containing a list of file names and modes along with refs to the associated blob and/or tree objects\&. A
1027 tree\-ish (also treeish)
1033 that can be recursively dereferenced to a tree object\&. Dereferencing a
1035 yields the tree object corresponding to the
1037 directory\&. The following are all tree\-ishes: a
1038 commit\-ish, a tree object, a
1040 that points to a tree object, a tag object that points to a tag object that points to a tree object, etc\&.
1047 which contains unmerged
1059 tag, or any other reference\&.
1066 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
1070 sometimes we say "\fIA\fR
1077 The tree of actual checked out files\&. The working tree normally contains the contents of the
1079 commit\(cqs tree, plus any local changes that you have made but not yet committed\&.
1084 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)\&.
1088 \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
1091 Part of the \fBgit\fR(1) suite
1094 The Git User\(cqs Manual
1096 \%git-htmldocs/user-manual.html