1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">
\r
4 <sect2 lang="en" id="gitglossary(7)">
\r
5 <title>gitglossary(7)</title>
\r
7 <primary>gitglossary(7)</primary>
\r
9 <simplesect id="gitglossary(7)__name">
\r
11 <simpara>gitglossary - A Git Glossary</simpara>
\r
13 <simplesect id="gitglossary(7)__synopsis">
\r
14 <title>SYNOPSIS</title>
\r
15 <simpara>*</simpara>
\r
17 <simplesect id="gitglossary(7)__description">
\r
18 <title>DESCRIPTION</title>
\r
22 <anchor id="gitglossary(7)_def_alternate_object_database" xreflabel="[def_alternate_object_database]"/>alternate object database
\r
26 Via the alternates mechanism, a <link linkend="gitglossary(7)_def_repository">repository</link>
\r
27 can inherit part of its <link linkend="gitglossary(7)_def_object_database">object database</link>
\r
28 from another object database, which is called an "alternate".
\r
34 <anchor id="gitglossary(7)_def_bare_repository" xreflabel="[def_bare_repository]"/>bare repository
\r
38 A bare repository is normally an appropriately
\r
39 named <link linkend="gitglossary(7)_def_directory">directory</link> with a <emphasis>.git</emphasis> suffix that does not
\r
40 have a locally checked-out copy of any of the files under
\r
41 revision control. That is, all of the Git
\r
42 administrative and control files that would normally be present in the
\r
43 hidden <emphasis>.git</emphasis> sub-directory are directly present in the
\r
44 <emphasis>repository.git</emphasis> directory instead,
\r
45 and no other files are present and checked out. Usually publishers of
\r
46 public repositories make bare repositories available.
\r
52 <anchor id="gitglossary(7)_def_blob_object" xreflabel="[def_blob_object]"/>blob object
\r
56 Untyped <link linkend="gitglossary(7)_def_object">object</link>, e.g. the contents of a file.
\r
62 <anchor id="gitglossary(7)_def_branch" xreflabel="[def_branch]"/>branch
\r
66 A "branch" is an active line of development. The most recent
\r
67 <link linkend="gitglossary(7)_def_commit">commit</link> on a branch is referred to as the tip of
\r
68 that branch. The tip of the branch is referenced by a branch
\r
69 <link linkend="gitglossary(7)_def_head">head</link>, which moves forward as additional development
\r
70 is done on the branch. A single Git
\r
71 <link linkend="gitglossary(7)_def_repository">repository</link> can track an arbitrary number of
\r
72 branches, but your <link linkend="gitglossary(7)_def_working_tree">working tree</link> is
\r
73 associated with just one of them (the "current" or "checked out"
\r
74 branch), and <link linkend="gitglossary(7)_def_HEAD">HEAD</link> points to that branch.
\r
80 <anchor id="gitglossary(7)_def_cache" xreflabel="[def_cache]"/>cache
\r
84 Obsolete for: <link linkend="gitglossary(7)_def_index">index</link>.
\r
90 <anchor id="gitglossary(7)_def_chain" xreflabel="[def_chain]"/>chain
\r
94 A list of objects, where each <link linkend="gitglossary(7)_def_object">object</link> in the list contains
\r
95 a reference to its successor (for example, the successor of a
\r
96 <link linkend="gitglossary(7)_def_commit">commit</link> could be one of its <link linkend="gitglossary(7)_def_parent">parents</link>).
\r
102 <anchor id="gitglossary(7)_def_changeset" xreflabel="[def_changeset]"/>changeset
\r
106 BitKeeper/cvsps speak for "<link linkend="gitglossary(7)_def_commit">commit</link>". Since Git does not
\r
107 store changes, but states, it really does not make sense to use the term
\r
108 "changesets" with Git.
\r
114 <anchor id="gitglossary(7)_def_checkout" xreflabel="[def_checkout]"/>checkout
\r
118 The action of updating all or part of the
\r
119 <link linkend="gitglossary(7)_def_working_tree">working tree</link> with a <link linkend="gitglossary(7)_def_tree_object">tree object</link>
\r
120 or <link linkend="gitglossary(7)_def_blob_object">blob</link> from the
\r
121 <link linkend="gitglossary(7)_def_object_database">object database</link>, and updating the
\r
122 <link linkend="gitglossary(7)_def_index">index</link> and <link linkend="gitglossary(7)_def_HEAD">HEAD</link> if the whole working tree has
\r
123 been pointed at a new <link linkend="gitglossary(7)_def_branch">branch</link>.
\r
129 <anchor id="gitglossary(7)_def_cherry-picking" xreflabel="[def_cherry-picking]"/>cherry-picking
\r
133 In <link linkend="gitglossary(7)_def_SCM">SCM</link> jargon, "cherry pick" means to choose a subset of
\r
134 changes out of a series of changes (typically commits) and record them
\r
135 as a new series of changes on top of a different codebase. In Git, this is
\r
136 performed by the "git cherry-pick" command to extract the change introduced
\r
137 by an existing <link linkend="gitglossary(7)_def_commit">commit</link> and to record it based on the tip
\r
138 of the current <link linkend="gitglossary(7)_def_branch">branch</link> as a new commit.
\r
144 <anchor id="gitglossary(7)_def_clean" xreflabel="[def_clean]"/>clean
\r
148 A <link linkend="gitglossary(7)_def_working_tree">working tree</link> is clean, if it
\r
149 corresponds to the <link linkend="gitglossary(7)_def_revision">revision</link> referenced by the current
\r
150 <link linkend="gitglossary(7)_def_head">head</link>. Also see "<link linkend="gitglossary(7)_def_dirty">dirty</link>".
\r
156 <anchor id="gitglossary(7)_def_commit" xreflabel="[def_commit]"/>commit
\r
160 As a noun: A single point in the
\r
161 Git history; the entire history of a project is represented as a
\r
162 set of interrelated commits. The word "commit" is often
\r
163 used by Git in the same places other revision control systems
\r
164 use the words "revision" or "version". Also used as a short
\r
165 hand for <link linkend="gitglossary(7)_def_commit_object">commit object</link>.
\r
167 <simpara>As a verb: The action of storing a new snapshot of the project's
\r
168 state in the Git history, by creating a new commit representing the current
\r
169 state of the <link linkend="gitglossary(7)_def_index">index</link> and advancing <link linkend="gitglossary(7)_def_HEAD">HEAD</link>
\r
170 to point at the new commit.</simpara>
\r
175 <anchor id="gitglossary(7)_def_commit_object" xreflabel="[def_commit_object]"/>commit object
\r
179 An <link linkend="gitglossary(7)_def_object">object</link> which contains the information about a
\r
180 particular <link linkend="gitglossary(7)_def_revision">revision</link>, such as <link linkend="gitglossary(7)_def_parent">parents</link>, committer,
\r
181 author, date and the <link linkend="gitglossary(7)_def_tree_object">tree object</link> which corresponds
\r
182 to the top <link linkend="gitglossary(7)_def_directory">directory</link> of the stored
\r
189 <anchor id="gitglossary(7)_def_commit-ish" xreflabel="[def_commit-ish]"/>commit-ish (also committish)
\r
193 A <link linkend="gitglossary(7)_def_commit_object">commit object</link> or an
\r
194 <link linkend="gitglossary(7)_def_object">object</link> that can be recursively dereferenced to
\r
196 The following are all commit-ishes:
\r
198 a <link linkend="gitglossary(7)_def_tag_object">tag object</link> that points to a commit
\r
200 a tag object that points to a tag object that points to a
\r
208 <anchor id="gitglossary(7)_def_core_git" xreflabel="[def_core_git]"/>core Git
\r
212 Fundamental data structures and utilities of Git. Exposes only limited
\r
213 source code management tools.
\r
219 <anchor id="gitglossary(7)_def_DAG" xreflabel="[def_DAG]"/>DAG
\r
223 Directed acyclic graph. The <link linkend="gitglossary(7)_def_commit_object">commit objects</link> form a
\r
224 directed acyclic graph, because they have parents (directed), and the
\r
225 graph of commit objects is acyclic (there is no <link linkend="gitglossary(7)_def_chain">chain</link>
\r
226 which begins and ends with the same <link linkend="gitglossary(7)_def_object">object</link>).
\r
232 <anchor id="gitglossary(7)_def_dangling_object" xreflabel="[def_dangling_object]"/>dangling object
\r
236 An <link linkend="gitglossary(7)_def_unreachable_object">unreachable object</link> which is not
\r
237 <link linkend="gitglossary(7)_def_reachable">reachable</link> even from other unreachable objects; a
\r
238 dangling object has no references to it from any
\r
239 reference or <link linkend="gitglossary(7)_def_object">object</link> in the <link linkend="gitglossary(7)_def_repository">repository</link>.
\r
245 <anchor id="gitglossary(7)_def_detached_HEAD" xreflabel="[def_detached_HEAD]"/>detached HEAD
\r
249 Normally the <link linkend="gitglossary(7)_def_HEAD">HEAD</link> stores the name of a
\r
250 <link linkend="gitglossary(7)_def_branch">branch</link>, and commands that operate on the
\r
251 history HEAD represents operate on the history leading to the
\r
252 tip of the branch the HEAD points at. However, Git also
\r
253 allows you to <link linkend="gitglossary(7)_def_checkout">check out</link> an arbitrary
\r
254 <link linkend="gitglossary(7)_def_commit">commit</link> that isn't necessarily the tip of any
\r
255 particular branch. The HEAD in such a state is called
\r
258 <simpara>Note that commands that operate on the history of the current branch
\r
259 (e.g. <emphasis>git commit</emphasis> to build a new history on top of it) still work
\r
260 while the HEAD is detached. They update the HEAD to point at the tip
\r
261 of the updated history without affecting any branch. Commands that
\r
262 update or inquire information <emphasis>about</emphasis> the current branch (e.g. <emphasis>git
\r
263 branch --set-upstream-to</emphasis> that sets what remote-tracking branch the
\r
264 current branch integrates with) obviously do not work, as there is no
\r
265 (real) current branch to ask about in this state.</simpara>
\r
270 <anchor id="gitglossary(7)_def_directory" xreflabel="[def_directory]"/>directory
\r
274 The list you get with "ls" :-)
\r
280 <anchor id="gitglossary(7)_def_dirty" xreflabel="[def_dirty]"/>dirty
\r
284 A <link linkend="gitglossary(7)_def_working_tree">working tree</link> is said to be "dirty" if
\r
285 it contains modifications which have not been <link linkend="gitglossary(7)_def_commit">committed</link> to the current
\r
286 <link linkend="gitglossary(7)_def_branch">branch</link>.
\r
292 <anchor id="gitglossary(7)_def_evil_merge" xreflabel="[def_evil_merge]"/>evil merge
\r
296 An evil merge is a <link linkend="gitglossary(7)_def_merge">merge</link> that introduces changes that
\r
297 do not appear in any <link linkend="gitglossary(7)_def_parent">parent</link>.
\r
303 <anchor id="gitglossary(7)_def_fast_forward" xreflabel="[def_fast_forward]"/>fast-forward
\r
307 A fast-forward is a special type of <link linkend="gitglossary(7)_def_merge">merge</link> where you have a
\r
308 <link linkend="gitglossary(7)_def_revision">revision</link> and you are "merging" another
\r
309 <link linkend="gitglossary(7)_def_branch">branch</link>'s changes that happen to be a descendant of what
\r
310 you have. In such a case, you do not make a new <link linkend="gitglossary(7)_def_merge">merge</link>
\r
311 <link linkend="gitglossary(7)_def_commit">commit</link> but instead just update to his
\r
312 revision. This will happen frequently on a
\r
313 <link linkend="gitglossary(7)_def_remote_tracking_branch">remote-tracking branch</link> of a remote
\r
314 <link linkend="gitglossary(7)_def_repository">repository</link>.
\r
320 <anchor id="gitglossary(7)_def_fetch" xreflabel="[def_fetch]"/>fetch
\r
324 Fetching a <link linkend="gitglossary(7)_def_branch">branch</link> means to get the
\r
325 branch's <link linkend="gitglossary(7)_def_head_ref">head ref</link> from a remote
\r
326 <link linkend="gitglossary(7)_def_repository">repository</link>, to find out which objects are
\r
327 missing from the local <link linkend="gitglossary(7)_def_object_database">object database</link>,
\r
328 and to get them, too. See also <xref linkend="git-fetch(1)" />.
\r
334 <anchor id="gitglossary(7)_def_file_system" xreflabel="[def_file_system]"/>file system
\r
338 Linus Torvalds originally designed Git to be a user space file system,
\r
339 i.e. the infrastructure to hold files and directories. That ensured the
\r
340 efficiency and speed of Git.
\r
346 <anchor id="gitglossary(7)_def_git_archive" xreflabel="[def_git_archive]"/>Git archive
\r
350 Synonym for <link linkend="gitglossary(7)_def_repository">repository</link> (for arch people).
\r
356 <anchor id="gitglossary(7)_def_gitfile" xreflabel="[def_gitfile]"/>gitfile
\r
360 A plain file <emphasis>.git</emphasis> at the root of a working tree that
\r
361 points at the directory that is the real repository.
\r
367 <anchor id="gitglossary(7)_def_grafts" xreflabel="[def_grafts]"/>grafts
\r
371 Grafts enables two otherwise different lines of development to be joined
\r
372 together by recording fake ancestry information for commits. This way
\r
373 you can make Git pretend the set of <link linkend="gitglossary(7)_def_parent">parents</link> a <link linkend="gitglossary(7)_def_commit">commit</link> has
\r
374 is different from what was recorded when the commit was
\r
375 created. Configured via the <emphasis>.git/info/grafts</emphasis> file.
\r
377 <simpara>Note that the grafts mechanism is outdated and can lead to problems
\r
378 transferring objects between repositories; see <xref linkend="git-replace(1)" />
\r
379 for a more flexible and robust system to do the same thing.</simpara>
\r
384 <anchor id="gitglossary(7)_def_hash" xreflabel="[def_hash]"/>hash
\r
388 In Git's context, synonym for <link linkend="gitglossary(7)_def_object_name">object name</link>.
\r
394 <anchor id="gitglossary(7)_def_head" xreflabel="[def_head]"/>head
\r
398 A <link linkend="gitglossary(7)_def_ref">named reference</link> to the <link linkend="gitglossary(7)_def_commit">commit</link> at the tip of a
\r
399 <link linkend="gitglossary(7)_def_branch">branch</link>. Heads are stored in a file in
\r
400 <emphasis>$GIT_DIR/refs/heads/</emphasis> directory, except when using packed refs. (See
\r
401 <xref linkend="git-pack-refs(1)" />.)
\r
407 <anchor id="gitglossary(7)_def_HEAD" xreflabel="[def_HEAD]"/>HEAD
\r
411 The current <link linkend="gitglossary(7)_def_branch">branch</link>. In more detail: Your <link linkend="gitglossary(7)_def_working_tree">working tree</link> is normally derived from the state of the tree
\r
412 referred to by HEAD. HEAD is a reference to one of the
\r
413 <link linkend="gitglossary(7)_def_head">heads</link> in your repository, except when using a
\r
414 <link linkend="gitglossary(7)_def_detached_HEAD">detached HEAD</link>, in which case it directly
\r
415 references an arbitrary commit.
\r
421 <anchor id="gitglossary(7)_def_head_ref" xreflabel="[def_head_ref]"/>head ref
\r
425 A synonym for <link linkend="gitglossary(7)_def_head">head</link>.
\r
431 <anchor id="gitglossary(7)_def_hook" xreflabel="[def_hook]"/>hook
\r
435 During the normal execution of several Git commands, call-outs are made
\r
436 to optional scripts that allow a developer to add functionality or
\r
437 checking. Typically, the hooks allow for a command to be pre-verified
\r
438 and potentially aborted, and allow for a post-notification after the
\r
439 operation is done. The hook scripts are found in the
\r
440 <emphasis>$GIT_DIR/hooks/</emphasis> directory, and are enabled by simply
\r
441 removing the <emphasis>.sample</emphasis> suffix from the filename. In earlier versions
\r
442 of Git you had to make them executable.
\r
448 <anchor id="gitglossary(7)_def_index" xreflabel="[def_index]"/>index
\r
452 A collection of files with stat information, whose contents are stored
\r
453 as objects. The index is a stored version of your
\r
454 <link linkend="gitglossary(7)_def_working_tree">working tree</link>. Truth be told, it can also contain a second, and even
\r
455 a third version of a working tree, which are used
\r
456 when <link linkend="gitglossary(7)_def_merge">merging</link>.
\r
462 <anchor id="gitglossary(7)_def_index_entry" xreflabel="[def_index_entry]"/>index entry
\r
466 The information regarding a particular file, stored in the
\r
467 <link linkend="gitglossary(7)_def_index">index</link>. An index entry can be unmerged, if a
\r
468 <link linkend="gitglossary(7)_def_merge">merge</link> was started, but not yet finished (i.e. if
\r
469 the index contains multiple versions of that file).
\r
475 <anchor id="gitglossary(7)_def_master" xreflabel="[def_master]"/>master
\r
479 The default development <link linkend="gitglossary(7)_def_branch">branch</link>. Whenever you
\r
480 create a Git <link linkend="gitglossary(7)_def_repository">repository</link>, a branch named
\r
481 "master" is created, and becomes the active branch. In most
\r
482 cases, this contains the local development, though that is
\r
483 purely by convention and is not required.
\r
489 <anchor id="gitglossary(7)_def_merge" xreflabel="[def_merge]"/>merge
\r
493 As a verb: To bring the contents of another
\r
494 <link linkend="gitglossary(7)_def_branch">branch</link> (possibly from an external
\r
495 <link linkend="gitglossary(7)_def_repository">repository</link>) into the current branch. In the
\r
496 case where the merged-in branch is from a different repository,
\r
497 this is done by first <link linkend="gitglossary(7)_def_fetch">fetching</link> the remote branch
\r
498 and then merging the result into the current branch. This
\r
499 combination of fetch and merge operations is called a
\r
500 <link linkend="gitglossary(7)_def_pull">pull</link>. Merging is performed by an automatic process
\r
501 that identifies changes made since the branches diverged, and
\r
502 then applies all those changes together. In cases where changes
\r
503 conflict, manual intervention may be required to complete the
\r
506 <simpara>As a noun: unless it is a <link linkend="gitglossary(7)_def_fast_forward">fast-forward</link>, a
\r
507 successful merge results in the creation of a new <link linkend="gitglossary(7)_def_commit">commit</link>
\r
508 representing the result of the merge, and having as
\r
509 <link linkend="gitglossary(7)_def_parent">parents</link> the tips of the merged <link linkend="gitglossary(7)_def_branch">branches</link>.
\r
510 This commit is referred to as a "merge commit", or sometimes just a
\r
516 <anchor id="gitglossary(7)_def_object" xreflabel="[def_object]"/>object
\r
520 The unit of storage in Git. It is uniquely identified by the
\r
521 <link linkend="gitglossary(7)_def_SHA1">SHA-1</link> of its contents. Consequently, an
\r
522 object cannot be changed.
\r
528 <anchor id="gitglossary(7)_def_object_database" xreflabel="[def_object_database]"/>object database
\r
532 Stores a set of "objects", and an individual <link linkend="gitglossary(7)_def_object">object</link> is
\r
533 identified by its <link linkend="gitglossary(7)_def_object_name">object name</link>. The objects usually
\r
534 live in <emphasis>$GIT_DIR/objects/</emphasis>.
\r
540 <anchor id="gitglossary(7)_def_object_identifier" xreflabel="[def_object_identifier]"/>object identifier
\r
544 Synonym for <link linkend="gitglossary(7)_def_object_name">object name</link>.
\r
550 <anchor id="gitglossary(7)_def_object_name" xreflabel="[def_object_name]"/>object name
\r
554 The unique identifier of an <link linkend="gitglossary(7)_def_object">object</link>. The
\r
555 object name is usually represented by a 40 character
\r
556 hexadecimal string. Also colloquially called <link linkend="gitglossary(7)_def_SHA1">SHA-1</link>.
\r
562 <anchor id="gitglossary(7)_def_object_type" xreflabel="[def_object_type]"/>object type
\r
566 One of the identifiers "<link linkend="gitglossary(7)_def_commit_object">commit</link>",
\r
567 "<link linkend="gitglossary(7)_def_tree_object">tree</link>", "<link linkend="gitglossary(7)_def_tag_object">tag</link>" or
\r
568 "<link linkend="gitglossary(7)_def_blob_object">blob</link>" describing the type of an
\r
569 <link linkend="gitglossary(7)_def_object">object</link>.
\r
575 <anchor id="gitglossary(7)_def_octopus" xreflabel="[def_octopus]"/>octopus
\r
579 To <link linkend="gitglossary(7)_def_merge">merge</link> more than two <link linkend="gitglossary(7)_def_branch">branches</link>.
\r
585 <anchor id="gitglossary(7)_def_origin" xreflabel="[def_origin]"/>origin
\r
589 The default upstream <link linkend="gitglossary(7)_def_repository">repository</link>. Most projects have
\r
590 at least one upstream project which they track. By default
\r
591 <emphasis>origin</emphasis> is used for that purpose. New upstream updates
\r
592 will be fetched into <link linkend="gitglossary(7)_def_remote_tracking_branch">remote-tracking branches</link> named
\r
593 origin/name-of-upstream-branch, which you can see using
\r
594 <emphasis>git branch -r</emphasis>.
\r
600 <anchor id="gitglossary(7)_def_overlay" xreflabel="[def_overlay]"/>overlay
\r
604 Only update and add files to the working directory, but don't
\r
605 delete them, similar to how <emphasis>cp -R</emphasis> would update the contents
\r
606 in the destination directory. This is the default mode in a
\r
607 <link linkend="gitglossary(7)_def_checkout">checkout</link> when checking out files from the
\r
608 <link linkend="gitglossary(7)_def_index">index</link> or a <link linkend="gitglossary(7)_def_tree-ish">tree-ish</link>. In
\r
609 contrast, no-overlay mode also deletes tracked files not
\r
610 present in the source, similar to <emphasis>rsync --delete</emphasis>.
\r
616 <anchor id="gitglossary(7)_def_pack" xreflabel="[def_pack]"/>pack
\r
620 A set of objects which have been compressed into one file (to save space
\r
621 or to transmit them efficiently).
\r
627 <anchor id="gitglossary(7)_def_pack_index" xreflabel="[def_pack_index]"/>pack index
\r
631 The list of identifiers, and other information, of the objects in a
\r
632 <link linkend="gitglossary(7)_def_pack">pack</link>, to assist in efficiently accessing the contents of a
\r
639 <anchor id="gitglossary(7)_def_pathspec" xreflabel="[def_pathspec]"/>pathspec
\r
643 Pattern used to limit paths in Git commands.
\r
645 <simpara>Pathspecs are used on the command line of "git ls-files", "git
\r
646 ls-tree", "git add", "git grep", "git diff", "git checkout",
\r
647 and many other commands to
\r
648 limit the scope of operations to some subset of the tree or
\r
649 worktree. See the documentation of each command for whether
\r
650 paths are relative to the current directory or toplevel. The
\r
651 pathspec syntax is as follows:</simpara>
\r
655 any path matches itself
\r
660 the pathspec up to the last slash represents a
\r
661 directory prefix. The scope of that pathspec is
\r
662 limited to that subtree.
\r
667 the rest of the pathspec is a pattern for the remainder
\r
668 of the pathname. Paths relative to the directory
\r
669 prefix will be matched against that pattern using fnmatch(3);
\r
670 in particular, <emphasis>*</emphasis> and <emphasis>?</emphasis> <emphasis>can</emphasis> match directory separators.
\r
674 <simpara>For example, Documentation/*.jpg will match all .jpg files
\r
675 in the Documentation subtree,
\r
676 including Documentation/chapter_1/figure_1.jpg.</simpara>
\r
677 <simpara>A pathspec that begins with a colon <emphasis>:</emphasis> has special meaning. In the
\r
678 short form, the leading colon <emphasis>:</emphasis> is followed by zero or more "magic
\r
679 signature" letters (which optionally is terminated by another colon <emphasis>:</emphasis>),
\r
680 and the remainder is the pattern to match against the path.
\r
681 The "magic signature" consists of ASCII symbols that are neither
\r
682 alphanumeric, glob, regex special characters nor colon.
\r
683 The optional colon that terminates the "magic signature" can be
\r
684 omitted if the pattern begins with a character that does not belong to
\r
685 "magic signature" symbol set and is not a colon.</simpara>
\r
686 <simpara>In the long form, the leading colon <emphasis>:</emphasis> is followed by an open
\r
687 parenthesis <emphasis>(</emphasis>, a comma-separated list of zero or more "magic words",
\r
688 and a close parentheses <emphasis>)</emphasis>, and the remainder is the pattern to match
\r
689 against the path.</simpara>
\r
690 <simpara>A pathspec with only a colon means "there is no pathspec". This form
\r
691 should not be combined with other pathspec.</simpara>
\r
699 The magic word <emphasis>top</emphasis> (magic signature: <emphasis>/</emphasis>) makes the pattern
\r
700 match from the root of the working tree, even when you are
\r
701 running the command from inside a subdirectory.
\r
711 Wildcards in the pattern such as <emphasis>*</emphasis> or <emphasis>?</emphasis> are treated
\r
712 as literal characters.
\r
722 Case insensitive match.
\r
732 Git treats the pattern as a shell glob suitable for
\r
733 consumption by fnmatch(3) with the FNM_PATHNAME flag:
\r
734 wildcards in the pattern will not match a / in the pathname.
\r
735 For example, "Documentation/*.html" matches
\r
736 "Documentation/git.html" but not "Documentation/ppc/ppc.html"
\r
737 or "tools/perf/Documentation/perf.html".
\r
739 <simpara>Two consecutive asterisks ("<emphasis>**</emphasis>") in patterns matched against
\r
740 full pathname may have special meaning:</simpara>
\r
744 A leading "<emphasis>**</emphasis>" followed by a slash means match in all
\r
745 directories. For example, "<emphasis>**/foo</emphasis>" matches file or directory
\r
746 "<emphasis>foo</emphasis>" anywhere, the same as pattern "<emphasis>foo</emphasis>". "<emphasis>**/foo/bar</emphasis>"
\r
747 matches file or directory "<emphasis>bar</emphasis>" anywhere that is directly
\r
748 under directory "<emphasis>foo</emphasis>".
\r
753 A trailing "<emphasis>/**</emphasis>" matches everything inside. For example,
\r
754 "<emphasis>abc/**</emphasis>" matches all files inside directory "abc", relative
\r
755 to the location of the <emphasis>.gitignore</emphasis> file, with infinite depth.
\r
760 A slash followed by two consecutive asterisks then a slash
\r
761 matches zero or more directories. For example, "<emphasis>a/**/b</emphasis>"
\r
762 matches "<emphasis>a/b</emphasis>", "<emphasis>a/x/b</emphasis>", "<emphasis>a/x/y/b</emphasis>" and so on.
\r
767 Other consecutive asterisks are considered invalid.
\r
769 <simpara>Glob magic is incompatible with literal magic.</simpara>
\r
780 After <emphasis>attr:</emphasis> comes a space separated list of "attribute
\r
781 requirements", all of which must be met in order for the
\r
782 path to be considered a match; this is in addition to the
\r
783 usual non-magic pathspec pattern matching.
\r
784 See <xref linkend="gitattributes(5)" />.
\r
786 <simpara>Each of the attribute requirements for the path takes one of
\r
787 these forms:</simpara>
\r
791 "<emphasis>ATTR</emphasis>" requires that the attribute <emphasis>ATTR</emphasis> be set.
\r
796 "<emphasis>-ATTR</emphasis>" requires that the attribute <emphasis>ATTR</emphasis> be unset.
\r
801 "<emphasis>ATTR=VALUE</emphasis>" requires that the attribute <emphasis>ATTR</emphasis> be
\r
802 set to the string <emphasis>VALUE</emphasis>.
\r
807 "<emphasis>!ATTR</emphasis>" requires that the attribute <emphasis>ATTR</emphasis> be
\r
810 <simpara>Note that when matching against a tree object, attributes are still
\r
811 obtained from working tree, not from the given tree object.</simpara>
\r
822 After a path matches any non-exclude pathspec, it will be run
\r
823 through all exclude pathspecs (magic signature: <emphasis>!</emphasis> or its
\r
824 synonym <emphasis>^</emphasis>). If it matches, the path is ignored. When there
\r
825 is no non-exclude pathspec, the exclusion is applied to the
\r
826 result set as if invoked without any pathspec.
\r
835 <anchor id="gitglossary(7)_def_parent" xreflabel="[def_parent]"/>parent
\r
839 A <link linkend="gitglossary(7)_def_commit_object">commit object</link> contains a (possibly empty) list
\r
840 of the logical predecessor(s) in the line of development, i.e. its
\r
847 <anchor id="gitglossary(7)_def_pickaxe" xreflabel="[def_pickaxe]"/>pickaxe
\r
851 The term <link linkend="gitglossary(7)_def_pickaxe">pickaxe</link> refers to an option to the diffcore
\r
852 routines that help select changes that add or delete a given text
\r
853 string. With the <emphasis>--pickaxe-all</emphasis> option, it can be used to view the full
\r
854 <link linkend="gitglossary(7)_def_changeset">changeset</link> that introduced or removed, say, a
\r
855 particular line of text. See <xref linkend="git-diff(1)" />.
\r
861 <anchor id="gitglossary(7)_def_plumbing" xreflabel="[def_plumbing]"/>plumbing
\r
865 Cute name for <link linkend="gitglossary(7)_def_core_git">core Git</link>.
\r
871 <anchor id="gitglossary(7)_def_porcelain" xreflabel="[def_porcelain]"/>porcelain
\r
875 Cute name for programs and program suites depending on
\r
876 <link linkend="gitglossary(7)_def_core_git">core Git</link>, presenting a high level access to
\r
877 core Git. Porcelains expose more of a <link linkend="gitglossary(7)_def_SCM">SCM</link>
\r
878 interface than the <link linkend="gitglossary(7)_def_plumbing">plumbing</link>.
\r
884 <anchor id="gitglossary(7)_def_per_worktree_ref" xreflabel="[def_per_worktree_ref]"/>per-worktree ref
\r
888 Refs that are per-<link linkend="gitglossary(7)_def_working_tree">worktree</link>, rather than
\r
889 global. This is presently only <link linkend="gitglossary(7)_def_HEAD">HEAD</link> and any refs
\r
890 that start with <emphasis>refs/bisect/</emphasis>, but might later include other
\r
897 <anchor id="gitglossary(7)_def_pseudoref" xreflabel="[def_pseudoref]"/>pseudoref
\r
901 Pseudorefs are a class of files under <emphasis>$GIT_DIR</emphasis> which behave
\r
902 like refs for the purposes of rev-parse, but which are treated
\r
903 specially by git. Pseudorefs both have names that are all-caps,
\r
904 and always start with a line consisting of a
\r
905 <link linkend="gitglossary(7)_def_SHA1">SHA-1</link> followed by whitespace. So, HEAD is not a
\r
906 pseudoref, because it is sometimes a symbolic ref. They might
\r
907 optionally contain some additional data. <emphasis>MERGE_HEAD</emphasis> and
\r
908 <emphasis>CHERRY_PICK_HEAD</emphasis> are examples. Unlike
\r
909 <link linkend="gitglossary(7)_def_per_worktree_ref">per-worktree refs</link>, these files cannot
\r
910 be symbolic refs, and never have reflogs. They also cannot be
\r
911 updated through the normal ref update machinery. Instead,
\r
912 they are updated by directly writing to the files. However,
\r
913 they can be read as if they were refs, so <emphasis>git rev-parse
\r
914 MERGE_HEAD</emphasis> will work.
\r
920 <anchor id="gitglossary(7)_def_pull" xreflabel="[def_pull]"/>pull
\r
924 Pulling a <link linkend="gitglossary(7)_def_branch">branch</link> means to <link linkend="gitglossary(7)_def_fetch">fetch</link> it and
\r
925 <link linkend="gitglossary(7)_def_merge">merge</link> it. See also <xref linkend="git-pull(1)" />.
\r
931 <anchor id="gitglossary(7)_def_push" xreflabel="[def_push]"/>push
\r
935 Pushing a <link linkend="gitglossary(7)_def_branch">branch</link> means to get the branch's
\r
936 <link linkend="gitglossary(7)_def_head_ref">head ref</link> from a remote <link linkend="gitglossary(7)_def_repository">repository</link>,
\r
937 find out if it is an ancestor to the branch's local
\r
938 head ref, and in that case, putting all
\r
939 objects, which are <link linkend="gitglossary(7)_def_reachable">reachable</link> from the local
\r
940 head ref, and which are missing from the remote
\r
941 repository, into the remote
\r
942 <link linkend="gitglossary(7)_def_object_database">object database</link>, and updating the remote
\r
943 head ref. If the remote <link linkend="gitglossary(7)_def_head">head</link> is not an
\r
944 ancestor to the local head, the push fails.
\r
950 <anchor id="gitglossary(7)_def_reachable" xreflabel="[def_reachable]"/>reachable
\r
954 All of the ancestors of a given <link linkend="gitglossary(7)_def_commit">commit</link> are said to be
\r
955 "reachable" from that commit. More
\r
956 generally, one <link linkend="gitglossary(7)_def_object">object</link> is reachable from
\r
957 another if we can reach the one from the other by a <link linkend="gitglossary(7)_def_chain">chain</link>
\r
958 that follows <link linkend="gitglossary(7)_def_tag">tags</link> to whatever they tag,
\r
959 <link linkend="gitglossary(7)_def_commit_object">commits</link> to their parents or trees, and
\r
960 <link linkend="gitglossary(7)_def_tree_object">trees</link> to the trees or <link linkend="gitglossary(7)_def_blob_object">blobs</link>
\r
967 <anchor id="gitglossary(7)_def_rebase" xreflabel="[def_rebase]"/>rebase
\r
971 To reapply a series of changes from a <link linkend="gitglossary(7)_def_branch">branch</link> to a
\r
972 different base, and reset the <link linkend="gitglossary(7)_def_head">head</link> of that branch
\r
979 <anchor id="gitglossary(7)_def_ref" xreflabel="[def_ref]"/>ref
\r
983 A name that begins with <emphasis>refs/</emphasis> (e.g. <emphasis>refs/heads/master</emphasis>)
\r
984 that points to an <link linkend="gitglossary(7)_def_object_name">object name</link> or another
\r
985 ref (the latter is called a <link linkend="gitglossary(7)_def_symref">symbolic ref</link>).
\r
986 For convenience, a ref can sometimes be abbreviated when used
\r
987 as an argument to a Git command; see <xref linkend="gitrevisions(7)" />
\r
989 Refs are stored in the <link linkend="gitglossary(7)_def_repository">repository</link>.
\r
991 <simpara>The ref namespace is hierarchical.
\r
992 Different subhierarchies are used for different purposes (e.g. the
\r
993 <emphasis>refs/heads/</emphasis> hierarchy is used to represent local branches).</simpara>
\r
994 <simpara>There are a few special-purpose refs that do not begin with <emphasis>refs/</emphasis>.
\r
995 The most notable example is <emphasis>HEAD</emphasis>.</simpara>
\r
1000 <anchor id="gitglossary(7)_def_reflog" xreflabel="[def_reflog]"/>reflog
\r
1004 A reflog shows the local "history" of a ref. In other words,
\r
1005 it can tell you what the 3rd last revision in <emphasis>this</emphasis> repository
\r
1006 was, and what was the current state in <emphasis>this</emphasis> repository,
\r
1007 yesterday 9:14pm. See <xref linkend="git-reflog(1)" /> for details.
\r
1013 <anchor id="gitglossary(7)_def_refspec" xreflabel="[def_refspec]"/>refspec
\r
1017 A "refspec" is used by <link linkend="gitglossary(7)_def_fetch">fetch</link> and
\r
1018 <link linkend="gitglossary(7)_def_push">push</link> to describe the mapping between remote
\r
1019 <link linkend="gitglossary(7)_def_ref">ref</link> and local ref.
\r
1025 <anchor id="gitglossary(7)_def_remote" xreflabel="[def_remote]"/>remote repository
\r
1029 A <link linkend="gitglossary(7)_def_repository">repository</link> which is used to track the same
\r
1030 project but resides somewhere else. To communicate with remotes,
\r
1031 see <link linkend="gitglossary(7)_def_fetch">fetch</link> or <link linkend="gitglossary(7)_def_push">push</link>.
\r
1037 <anchor id="gitglossary(7)_def_remote_tracking_branch" xreflabel="[def_remote_tracking_branch]"/>remote-tracking branch
\r
1041 A <link linkend="gitglossary(7)_def_ref">ref</link> that is used to follow changes from another
\r
1042 <link linkend="gitglossary(7)_def_repository">repository</link>. It typically looks like
\r
1043 <emphasis>refs/remotes/foo/bar</emphasis> (indicating that it tracks a branch named
\r
1044 <emphasis>bar</emphasis> in a remote named <emphasis>foo</emphasis>), and matches the right-hand-side of
\r
1045 a configured fetch <link linkend="gitglossary(7)_def_refspec">refspec</link>. A remote-tracking
\r
1046 branch should not contain direct modifications or have local
\r
1047 commits made to it.
\r
1053 <anchor id="gitglossary(7)_def_repository" xreflabel="[def_repository]"/>repository
\r
1057 A collection of <link linkend="gitglossary(7)_def_ref">refs</link> together with an
\r
1058 <link linkend="gitglossary(7)_def_object_database">object database</link> containing all objects
\r
1059 which are <link linkend="gitglossary(7)_def_reachable">reachable</link> from the refs, possibly
\r
1060 accompanied by meta data from one or more <link linkend="gitglossary(7)_def_porcelain">porcelains</link>. A
\r
1061 repository can share an object database with other repositories
\r
1062 via <link linkend="gitglossary(7)_def_alternate_object_database">alternates mechanism</link>.
\r
1068 <anchor id="gitglossary(7)_def_resolve" xreflabel="[def_resolve]"/>resolve
\r
1072 The action of fixing up manually what a failed automatic
\r
1073 <link linkend="gitglossary(7)_def_merge">merge</link> left behind.
\r
1079 <anchor id="gitglossary(7)_def_revision" xreflabel="[def_revision]"/>revision
\r
1083 Synonym for <link linkend="gitglossary(7)_def_commit">commit</link> (the noun).
\r
1089 <anchor id="gitglossary(7)_def_rewind" xreflabel="[def_rewind]"/>rewind
\r
1093 To throw away part of the development, i.e. to assign the
\r
1094 <link linkend="gitglossary(7)_def_head">head</link> to an earlier <link linkend="gitglossary(7)_def_revision">revision</link>.
\r
1100 <anchor id="gitglossary(7)_def_SCM" xreflabel="[def_SCM]"/>SCM
\r
1104 Source code management (tool).
\r
1110 <anchor id="gitglossary(7)_def_SHA1" xreflabel="[def_SHA1]"/>SHA-1
\r
1114 "Secure Hash Algorithm 1"; a cryptographic hash function.
\r
1115 In the context of Git used as a synonym for <link linkend="gitglossary(7)_def_object_name">object name</link>.
\r
1121 <anchor id="gitglossary(7)_def_shallow_clone" xreflabel="[def_shallow_clone]"/>shallow clone
\r
1125 Mostly a synonym to <link linkend="gitglossary(7)_def_shallow_repository">shallow repository</link>
\r
1126 but the phrase makes it more explicit that it was created by
\r
1127 running <emphasis>git clone --depth=...</emphasis> command.
\r
1133 <anchor id="gitglossary(7)_def_shallow_repository" xreflabel="[def_shallow_repository]"/>shallow repository
\r
1137 A shallow <link linkend="gitglossary(7)_def_repository">repository</link> has an incomplete
\r
1138 history some of whose <link linkend="gitglossary(7)_def_commit">commits</link> have <link linkend="gitglossary(7)_def_parent">parents</link> cauterized away (in other
\r
1139 words, Git is told to pretend that these commits do not have the
\r
1140 parents, even though they are recorded in the <link linkend="gitglossary(7)_def_commit_object">commit object</link>). This is sometimes useful when you are interested only in the
\r
1141 recent history of a project even though the real history recorded in the
\r
1142 upstream is much larger. A shallow repository
\r
1143 is created by giving the <emphasis>--depth</emphasis> option to <xref linkend="git-clone(1)" />, and
\r
1144 its history can be later deepened with <xref linkend="git-fetch(1)" />.
\r
1150 <anchor id="gitglossary(7)_def_stash" xreflabel="[def_stash]"/>stash entry
\r
1154 An <link linkend="gitglossary(7)_def_object">object</link> used to temporarily store the contents of a
\r
1155 <link linkend="gitglossary(7)_def_dirty">dirty</link> working directory and the index for future reuse.
\r
1161 <anchor id="gitglossary(7)_def_submodule" xreflabel="[def_submodule]"/>submodule
\r
1165 A <link linkend="gitglossary(7)_def_repository">repository</link> that holds the history of a
\r
1166 separate project inside another repository (the latter of
\r
1167 which is called <link linkend="gitglossary(7)_def_superproject">superproject</link>).
\r
1173 <anchor id="gitglossary(7)_def_superproject" xreflabel="[def_superproject]"/>superproject
\r
1177 A <link linkend="gitglossary(7)_def_repository">repository</link> that references repositories
\r
1178 of other projects in its working tree as <link linkend="gitglossary(7)_def_submodule">submodules</link>.
\r
1179 The superproject knows about the names of (but does not hold
\r
1180 copies of) commit objects of the contained submodules.
\r
1186 <anchor id="gitglossary(7)_def_symref" xreflabel="[def_symref]"/>symref
\r
1190 Symbolic reference: instead of containing the <link linkend="gitglossary(7)_def_SHA1">SHA-1</link>
\r
1191 id itself, it is of the format <emphasis>ref: refs/some/thing</emphasis> and when
\r
1192 referenced, it recursively dereferences to this reference.
\r
1193 <emphasis><link linkend="gitglossary(7)_def_HEAD">HEAD</link></emphasis> is a prime example of a symref. Symbolic
\r
1194 references are manipulated with the <xref linkend="git-symbolic-ref(1)" />
\r
1201 <anchor id="gitglossary(7)_def_tag" xreflabel="[def_tag]"/>tag
\r
1205 A <link linkend="gitglossary(7)_def_ref">ref</link> under <emphasis>refs/tags/</emphasis> namespace that points to an
\r
1206 object of an arbitrary type (typically a tag points to either a
\r
1207 <link linkend="gitglossary(7)_def_tag_object">tag</link> or a <link linkend="gitglossary(7)_def_commit_object">commit object</link>).
\r
1208 In contrast to a <link linkend="gitglossary(7)_def_head">head</link>, a tag is not updated by
\r
1209 the <emphasis>commit</emphasis> command. A Git tag has nothing to do with a Lisp
\r
1210 tag (which would be called an <link linkend="gitglossary(7)_def_object_type">object type</link>
\r
1211 in Git's context). A tag is most typically used to mark a particular
\r
1212 point in the commit ancestry <link linkend="gitglossary(7)_def_chain">chain</link>.
\r
1218 <anchor id="gitglossary(7)_def_tag_object" xreflabel="[def_tag_object]"/>tag object
\r
1222 An <link linkend="gitglossary(7)_def_object">object</link> containing a <link linkend="gitglossary(7)_def_ref">ref</link> pointing to
\r
1223 another object, which can contain a message just like a
\r
1224 <link linkend="gitglossary(7)_def_commit_object">commit object</link>. It can also contain a (PGP)
\r
1225 signature, in which case it is called a "signed tag object".
\r
1231 <anchor id="gitglossary(7)_def_topic_branch" xreflabel="[def_topic_branch]"/>topic branch
\r
1235 A regular Git <link linkend="gitglossary(7)_def_branch">branch</link> that is used by a developer to
\r
1236 identify a conceptual line of development. Since branches are very easy
\r
1237 and inexpensive, it is often desirable to have several small branches
\r
1238 that each contain very well defined concepts or small incremental yet
\r
1245 <anchor id="gitglossary(7)_def_tree" xreflabel="[def_tree]"/>tree
\r
1249 Either a <link linkend="gitglossary(7)_def_working_tree">working tree</link>, or a <link linkend="gitglossary(7)_def_tree_object">tree object</link> together with the dependent <link linkend="gitglossary(7)_def_blob_object">blob</link> and tree objects
\r
1250 (i.e. a stored representation of a working tree).
\r
1256 <anchor id="gitglossary(7)_def_tree_object" xreflabel="[def_tree_object]"/>tree object
\r
1260 An <link linkend="gitglossary(7)_def_object">object</link> containing a list of file names and modes along
\r
1261 with refs to the associated blob and/or tree objects. A
\r
1262 <link linkend="gitglossary(7)_def_tree">tree</link> is equivalent to a <link linkend="gitglossary(7)_def_directory">directory</link>.
\r
1268 <anchor id="gitglossary(7)_def_tree-ish" xreflabel="[def_tree-ish]"/>tree-ish (also treeish)
\r
1272 A <link linkend="gitglossary(7)_def_tree_object">tree object</link> or an <link linkend="gitglossary(7)_def_object">object</link>
\r
1273 that can be recursively dereferenced to a tree object.
\r
1274 Dereferencing a <link linkend="gitglossary(7)_def_commit_object">commit object</link> yields the
\r
1275 tree object corresponding to the <link linkend="gitglossary(7)_def_revision">revision</link>'s
\r
1276 top <link linkend="gitglossary(7)_def_directory">directory</link>.
\r
1277 The following are all tree-ishes:
\r
1278 a <link linkend="gitglossary(7)_def_commit-ish">commit-ish</link>,
\r
1280 a <link linkend="gitglossary(7)_def_tag_object">tag object</link> that points to a tree object,
\r
1281 a tag object that points to a tag object that points to a tree
\r
1289 <anchor id="gitglossary(7)_def_unmerged_index" xreflabel="[def_unmerged_index]"/>unmerged index
\r
1293 An <link linkend="gitglossary(7)_def_index">index</link> which contains unmerged
\r
1294 <link linkend="gitglossary(7)_def_index_entry">index entries</link>.
\r
1300 <anchor id="gitglossary(7)_def_unreachable_object" xreflabel="[def_unreachable_object]"/>unreachable object
\r
1304 An <link linkend="gitglossary(7)_def_object">object</link> which is not <link linkend="gitglossary(7)_def_reachable">reachable</link> from a
\r
1305 <link linkend="gitglossary(7)_def_branch">branch</link>, <link linkend="gitglossary(7)_def_tag">tag</link>, or any other reference.
\r
1311 <anchor id="gitglossary(7)_def_upstream_branch" xreflabel="[def_upstream_branch]"/>upstream branch
\r
1315 The default <link linkend="gitglossary(7)_def_branch">branch</link> that is merged into the branch in
\r
1316 question (or the branch in question is rebased onto). It is configured
\r
1317 via branch.<name>.remote and branch.<name>.merge. If the upstream branch
\r
1318 of <emphasis>A</emphasis> is <emphasis>origin/B</emphasis> sometimes we say "<emphasis>A</emphasis> is tracking <emphasis>origin/B</emphasis>".
\r
1324 <anchor id="gitglossary(7)_def_working_tree" xreflabel="[def_working_tree]"/>working tree
\r
1328 The tree of actual checked out files. The working tree normally
\r
1329 contains the contents of the <link linkend="gitglossary(7)_def_HEAD">HEAD</link> commit's tree,
\r
1330 plus any local changes that you have made but not yet committed.
\r
1336 <simplesect id="gitglossary(7)__see_also">
\r
1337 <title>SEE ALSO</title>
\r
1338 <simpara><xref linkend="gittutorial(7)" />,
\r
1339 <xref linkend="gittutorial-2(7)" />,
\r
1340 <xref linkend="gitcvs-migration(7)" />,
\r
1341 <xref linkend="giteveryday(7)" />,
\r
1342 <ulink url="https://www.kernel.org/pub/software/scm/git/docs/user-manual.html"><citetitle>The Git User's Manual</citetitle></ulink></simpara>
\r
1344 <simplesect id="gitglossary(7)__git">
\r
1345 <title>GIT</title>
\r
1346 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r