blob: 8d38ae6010866a157dfdb7d52b58605d1cd2f3b6 [file] [log] [blame]
Junio C Hamano3d5b41f2007-03-26 02:33:411[[def_alternate_object_database]]alternate object database::
Junio C Hamano75485c82007-05-19 04:20:332Via the alternates mechanism, a <<def_repository,repository>>
3can inherit part of its <<def_object_database,object database>>
Junio C Hamanoc8c398a2014-06-16 21:14:054from another object database, which is called an "alternate".
Junio C Hamano1a4e8412005-12-27 08:17:235
Junio C Hamano3d5b41f2007-03-26 02:33:416[[def_bare_repository]]bare repository::
Junio C Hamano75485c82007-05-19 04:20:337A bare repository is normally an appropriately
Junio C Hamano3d5b41f2007-03-26 02:33:418named <<def_directory,directory>> with a `.git` suffix that does not
9have a locally checked-out copy of any of the files under
Junio C Hamano076ffcc2013-02-06 05:13:2110revision control. That is, all of the Git
Junio C Hamano3d5b41f2007-03-26 02:33:4111administrative and control files that would normally be present in the
12hidden `.git` sub-directory are directly present in the
13`repository.git` directory instead,
14and no other files are present and checked out. Usually publishers of
15public repositories make bare repositories available.
Junio C Hamano1a4e8412005-12-27 08:17:2316
Junio C Hamano3d5b41f2007-03-26 02:33:4117[[def_blob_object]]blob object::
18Untyped <<def_object,object>>, e.g. the contents of a file.
Junio C Hamano1a4e8412005-12-27 08:17:2319
Junio C Hamano3d5b41f2007-03-26 02:33:4120[[def_branch]]branch::
Junio C Hamano75485c82007-05-19 04:20:3321A "branch" is an active line of development. The most recent
22<<def_commit,commit>> on a branch is referred to as the tip of
23that branch. The tip of the branch is referenced by a branch
24<<def_head,head>>, which moves forward as additional development
Junio C Hamano076ffcc2013-02-06 05:13:2125is done on the branch. A single Git
Junio C Hamano75485c82007-05-19 04:20:3326<<def_repository,repository>> can track an arbitrary number of
27branches, but your <<def_working_tree,working tree>> is
28associated with just one of them (the "current" or "checked out"
29branch), and <<def_HEAD,HEAD>> points to that branch.
Junio C Hamano88a3a072006-05-04 08:01:4330
Junio C Hamano3d5b41f2007-03-26 02:33:4131[[def_cache]]cache::
32Obsolete for: <<def_index,index>>.
Junio C Hamano88a3a072006-05-04 08:01:4333
Junio C Hamano3d5b41f2007-03-26 02:33:4134[[def_chain]]chain::
35A list of objects, where each <<def_object,object>> in the list contains
36a reference to its successor (for example, the successor of a
Junio C Hamano36460982007-05-27 04:29:1237<<def_commit,commit>> could be one of its <<def_parent,parents>>).
Junio C Hamano88a3a072006-05-04 08:01:4338
Junio C Hamano3d5b41f2007-03-26 02:33:4139[[def_changeset]]changeset::
Junio C Hamano076ffcc2013-02-06 05:13:2140BitKeeper/cvsps speak for "<<def_commit,commit>>". Since Git does not
Junio C Hamano3d5b41f2007-03-26 02:33:4141store changes, but states, it really does not make sense to use the term
Junio C Hamano076ffcc2013-02-06 05:13:2142"changesets" with Git.
Junio C Hamano88a3a072006-05-04 08:01:4343
Junio C Hamano3d5b41f2007-03-26 02:33:4144[[def_checkout]]checkout::
Junio C Hamanoa14a4032008-03-25 09:11:0245The action of updating all or part of the
46<<def_working_tree,working tree>> with a <<def_tree_object,tree object>>
47or <<def_blob_object,blob>> from the
48<<def_object_database,object database>>, and updating the
49<<def_index,index>> and <<def_HEAD,HEAD>> if the whole working tree has
50been pointed at a new <<def_branch,branch>>.
Junio C Hamano88a3a072006-05-04 08:01:4351
Junio C Hamano3d5b41f2007-03-26 02:33:4152[[def_cherry-picking]]cherry-picking::
53In <<def_SCM,SCM>> jargon, "cherry pick" means to choose a subset of
54changes out of a series of changes (typically commits) and record them
Junio C Hamano076ffcc2013-02-06 05:13:2155as a new series of changes on top of a different codebase. In Git, this is
Junio C Hamano764a6672007-10-23 01:23:3156performed by the "git cherry-pick" command to extract the change introduced
Junio C Hamano3d5b41f2007-03-26 02:33:4157by an existing <<def_commit,commit>> and to record it based on the tip
Junio C Hamano75485c82007-05-19 04:20:3358of the current <<def_branch,branch>> as a new commit.
Junio C Hamano88a3a072006-05-04 08:01:4359
Junio C Hamano3d5b41f2007-03-26 02:33:4160[[def_clean]]clean::
Junio C Hamano75485c82007-05-19 04:20:3361A <<def_working_tree,working tree>> is clean, if it
Junio C Hamano3d5b41f2007-03-26 02:33:4162corresponds to the <<def_revision,revision>> referenced by the current
63<<def_head,head>>. Also see "<<def_dirty,dirty>>".
Junio C Hamano88a3a072006-05-04 08:01:4364
Junio C Hamano3d5b41f2007-03-26 02:33:4165[[def_commit]]commit::
Junio C Hamano75485c82007-05-19 04:20:3366As a noun: A single point in the
Junio C Hamano076ffcc2013-02-06 05:13:2167Git history; the entire history of a project is represented as a
Junio C Hamano75485c82007-05-19 04:20:3368set of interrelated commits. The word "commit" is often
Junio C Hamano076ffcc2013-02-06 05:13:2169used by Git in the same places other revision control systems
Junio C Hamano75485c82007-05-19 04:20:3370use the words "revision" or "version". Also used as a short
71hand for <<def_commit_object,commit object>>.
72+
73As a verb: The action of storing a new snapshot of the project's
Junio C Hamano076ffcc2013-02-06 05:13:2174state in the Git history, by creating a new commit representing the current
Junio C Hamano75485c82007-05-19 04:20:3375state of the <<def_index,index>> and advancing <<def_HEAD,HEAD>>
76to point at the new commit.
Junio C Hamano88a3a072006-05-04 08:01:4377
Junio C Hamano3d5b41f2007-03-26 02:33:4178[[def_commit_object]]commit object::
79An <<def_object,object>> which contains the information about a
Junio C Hamano36460982007-05-27 04:29:1280particular <<def_revision,revision>>, such as <<def_parent,parents>>, committer,
Junio C Hamano3d5b41f2007-03-26 02:33:4181author, date and the <<def_tree_object,tree object>> which corresponds
82to the top <<def_directory,directory>> of the stored
Junio C Hamano36460982007-05-27 04:29:1283revision.
Junio C Hamano1a4e8412005-12-27 08:17:2384
Junio C Hamanoe6f28d02013-09-17 21:34:0085[[def_commit-ish]]commit-ish (also committish)::
86A <<def_commit_object,commit object>> or an
87<<def_object,object>> that can be recursively dereferenced to
88a commit object.
89The following are all commit-ishes:
90a commit object,
91a <<def_tag_object,tag object>> that points to a commit
92object,
93a tag object that points to a tag object that points to a
94commit object,
95etc.
96
Junio C Hamano076ffcc2013-02-06 05:13:2197[[def_core_git]]core Git::
98Fundamental data structures and utilities of Git. Exposes only limited
Junio C Hamano3d5b41f2007-03-26 02:33:4199source code management tools.
Junio C Hamano1a4e8412005-12-27 08:17:23100
Junio C Hamano3d5b41f2007-03-26 02:33:41101[[def_DAG]]DAG::
Junio C Hamano9e1793f2008-06-02 07:31:16102Directed acyclic graph. The <<def_commit_object,commit objects>> form a
Junio C Hamano3d5b41f2007-03-26 02:33:41103directed acyclic graph, because they have parents (directed), and the
Junio C Hamano9e1793f2008-06-02 07:31:16104graph of commit objects is acyclic (there is no <<def_chain,chain>>
105which begins and ends with the same <<def_object,object>>).
Junio C Hamanoaa83a7d2007-03-05 02:37:29106
Junio C Hamano3d5b41f2007-03-26 02:33:41107[[def_dangling_object]]dangling object::
108An <<def_unreachable_object,unreachable object>> which is not
109<<def_reachable,reachable>> even from other unreachable objects; a
Junio C Hamano75485c82007-05-19 04:20:33110dangling object has no references to it from any
Junio C Hamano3d5b41f2007-03-26 02:33:41111reference or <<def_object,object>> in the <<def_repository,repository>>.
112
Junio C Hamano75485c82007-05-19 04:20:33113[[def_detached_HEAD]]detached HEAD::
114Normally the <<def_HEAD,HEAD>> stores the name of a
Junio C Hamanoea3b7522013-04-18 19:37:53115<<def_branch,branch>>, and commands that operate on the
116history HEAD represents operate on the history leading to the
117tip of the branch the HEAD points at. However, Git also
118allows you to <<def_checkout,check out>> an arbitrary
119<<def_commit,commit>> that isn't necessarily the tip of any
120particular branch. The HEAD in such a state is called
121"detached".
122+
123Note that commands that operate on the history of the current branch
124(e.g. `git commit` to build a new history on top of it) still work
125while the HEAD is detached. They update the HEAD to point at the tip
126of the updated history without affecting any branch. Commands that
127update or inquire information _about_ the current branch (e.g. `git
Junio C Hamano8401f142013-07-12 22:47:46128branch --set-upstream-to` that sets what remote-tracking branch the
Junio C Hamanoea3b7522013-04-18 19:37:53129current branch integrates with) obviously do not work, as there is no
130(real) current branch to ask about in this state.
Junio C Hamano75485c82007-05-19 04:20:33131
Junio C Hamano3d5b41f2007-03-26 02:33:41132[[def_directory]]directory::
Junio C Hamano88a3a072006-05-04 08:01:43133The list you get with "ls" :-)
134
Junio C Hamano3d5b41f2007-03-26 02:33:41135[[def_dirty]]dirty::
Junio C Hamano75485c82007-05-19 04:20:33136A <<def_working_tree,working tree>> is said to be "dirty" if
Junio C Hamano36460982007-05-27 04:29:12137it contains modifications which have not been <<def_commit,committed>> to the current
Junio C Hamano3d5b41f2007-03-26 02:33:41138<<def_branch,branch>>.
139
Junio C Hamano36460982007-05-27 04:29:12140[[def_evil_merge]]evil merge::
141An evil merge is a <<def_merge,merge>> that introduces changes that
142do not appear in any <<def_parent,parent>>.
143
Junio C Hamano3f680f32009-11-16 02:10:54144[[def_fast_forward]]fast-forward::
Junio C Hamano3d5b41f2007-03-26 02:33:41145A fast-forward is a special type of <<def_merge,merge>> where you have a
146<<def_revision,revision>> and you are "merging" another
147<<def_branch,branch>>'s changes that happen to be a descendant of what
Junio C Hamano74fd0fc2016-05-10 21:23:56148you have. In such a case, you do not make a new <<def_merge,merge>>
Junio C Hamano3d5b41f2007-03-26 02:33:41149<<def_commit,commit>> but instead just update to his
Junio C Hamano75485c82007-05-19 04:20:33150revision. This will happen frequently on a
Junio C Hamano97bcb482010-11-25 03:16:07151<<def_remote_tracking_branch,remote-tracking branch>> of a remote
Junio C Hamano3d5b41f2007-03-26 02:33:41152<<def_repository,repository>>.
Junio C Hamano88a3a072006-05-04 08:01:43153
Junio C Hamano3d5b41f2007-03-26 02:33:41154[[def_fetch]]fetch::
155Fetching a <<def_branch,branch>> means to get the
Junio C Hamano75485c82007-05-19 04:20:33156branch's <<def_head_ref,head ref>> from a remote
157<<def_repository,repository>>, to find out which objects are
158missing from the local <<def_object_database,object database>>,
Junio C Hamano35738e82008-01-07 07:55:46159and to get them, too. See also linkgit:git-fetch[1].
Junio C Hamano88a3a072006-05-04 08:01:43160
Junio C Hamano3d5b41f2007-03-26 02:33:41161[[def_file_system]]file system::
Junio C Hamano076ffcc2013-02-06 05:13:21162Linus Torvalds originally designed Git to be a user space file system,
Junio C Hamano3d5b41f2007-03-26 02:33:41163i.e. the infrastructure to hold files and directories. That ensured the
Junio C Hamano076ffcc2013-02-06 05:13:21164efficiency and speed of Git.
Junio C Hamano88a3a072006-05-04 08:01:43165
Junio C Hamano076ffcc2013-02-06 05:13:21166[[def_git_archive]]Git archive::
Junio C Hamano3d5b41f2007-03-26 02:33:41167Synonym for <<def_repository,repository>> (for arch people).
Junio C Hamano88a3a072006-05-04 08:01:43168
Junio C Hamano076ffcc2013-02-06 05:13:21169[[def_gitfile]]gitfile::
170A plain file `.git` at the root of a working tree that
171points at the directory that is the real repository.
172
Junio C Hamano3d5b41f2007-03-26 02:33:41173[[def_grafts]]grafts::
174Grafts enables two otherwise different lines of development to be joined
175together by recording fake ancestry information for commits. This way
Junio C Hamano076ffcc2013-02-06 05:13:21176you can make Git pretend the set of <<def_parent,parents>> a <<def_commit,commit>> has
Junio C Hamano75485c82007-05-19 04:20:33177is different from what was recorded when the commit was
Junio C Hamano3d5b41f2007-03-26 02:33:41178created. Configured via the `.git/info/grafts` file.
Junio C Hamano3b0cdc22014-03-18 22:06:16179+
180Note that the grafts mechanism is outdated and can lead to problems
181transferring objects between repositories; see linkgit:git-replace[1]
182for a more flexible and robust system to do the same thing.
Junio C Hamano33db4372006-06-07 19:51:45183
Junio C Hamano3d5b41f2007-03-26 02:33:41184[[def_hash]]hash::
Junio C Hamanoe3f080d2013-04-22 02:27:13185In Git's context, synonym for <<def_object_name,object name>>.
Junio C Hamano88a3a072006-05-04 08:01:43186
Junio C Hamano3d5b41f2007-03-26 02:33:41187[[def_head]]head::
Junio C Hamano36460982007-05-27 04:29:12188A <<def_ref,named reference>> to the <<def_commit,commit>> at the tip of a
Junio C Hamano360e3a12011-07-13 23:51:56189<<def_branch,branch>>. Heads are stored in a file in
190`$GIT_DIR/refs/heads/` directory, except when using packed refs. (See
Junio C Hamano35738e82008-01-07 07:55:46191linkgit:git-pack-refs[1].)
Junio C Hamano75485c82007-05-19 04:20:33192
193[[def_HEAD]]HEAD::
Junio C Hamano36460982007-05-27 04:29:12194The current <<def_branch,branch>>. In more detail: Your <<def_working_tree,
Junio C Hamano75485c82007-05-19 04:20:33195working tree>> is normally derived from the state of the tree
196referred to by HEAD. HEAD is a reference to one of the
197<<def_head,heads>> in your repository, except when using a
Junio C Hamano360e3a12011-07-13 23:51:56198<<def_detached_HEAD,detached HEAD>>, in which case it directly
199references an arbitrary commit.
Junio C Hamano88a3a072006-05-04 08:01:43200
Junio C Hamano3d5b41f2007-03-26 02:33:41201[[def_head_ref]]head ref::
Junio C Hamano75485c82007-05-19 04:20:33202A synonym for <<def_head,head>>.
Junio C Hamano88a3a072006-05-04 08:01:43203
Junio C Hamano3d5b41f2007-03-26 02:33:41204[[def_hook]]hook::
Junio C Hamano076ffcc2013-02-06 05:13:21205During the normal execution of several Git commands, call-outs are made
Junio C Hamano3d5b41f2007-03-26 02:33:41206to optional scripts that allow a developer to add functionality or
207checking. Typically, the hooks allow for a command to be pre-verified
208and potentially aborted, and allow for a post-notification after the
Junio C Hamano75485c82007-05-19 04:20:33209operation is done. The hook scripts are found in the
Junio C Hamano36460982007-05-27 04:29:12210`$GIT_DIR/hooks/` directory, and are enabled by simply
Junio C Hamano116db352008-12-17 19:48:40211removing the `.sample` suffix from the filename. In earlier versions
Junio C Hamano076ffcc2013-02-06 05:13:21212of Git you had to make them executable.
Junio C Hamano88a3a072006-05-04 08:01:43213
Junio C Hamano3d5b41f2007-03-26 02:33:41214[[def_index]]index::
215A collection of files with stat information, whose contents are stored
Junio C Hamano36460982007-05-27 04:29:12216as objects. The index is a stored version of your
217<<def_working_tree,working tree>>. Truth be told, it can also contain a second, and even
218a third version of a working tree, which are used
219when <<def_merge,merging>>.
Junio C Hamano1a4e8412005-12-27 08:17:23220
Junio C Hamano3d5b41f2007-03-26 02:33:41221[[def_index_entry]]index entry::
222The information regarding a particular file, stored in the
Junio C Hamano75485c82007-05-19 04:20:33223<<def_index,index>>. An index entry can be unmerged, if a
224<<def_merge,merge>> was started, but not yet finished (i.e. if
225the index contains multiple versions of that file).
Junio C Hamano1a4e8412005-12-27 08:17:23226
Junio C Hamano3d5b41f2007-03-26 02:33:41227[[def_master]]master::
Junio C Hamano75485c82007-05-19 04:20:33228The default development <<def_branch,branch>>. Whenever you
Junio C Hamano076ffcc2013-02-06 05:13:21229create a Git <<def_repository,repository>>, a branch named
Junio C Hamano75485c82007-05-19 04:20:33230"master" is created, and becomes the active branch. In most
231cases, this contains the local development, though that is
232purely by convention and is not required.
Junio C Hamano1a4e8412005-12-27 08:17:23233
Junio C Hamano3d5b41f2007-03-26 02:33:41234[[def_merge]]merge::
Junio C Hamano75485c82007-05-19 04:20:33235As a verb: To bring the contents of another
236<<def_branch,branch>> (possibly from an external
237<<def_repository,repository>>) into the current branch. In the
238case where the merged-in branch is from a different repository,
239this is done by first <<def_fetch,fetching>> the remote branch
240and then merging the result into the current branch. This
241combination of fetch and merge operations is called a
242<<def_pull,pull>>. Merging is performed by an automatic process
243that identifies changes made since the branches diverged, and
244then applies all those changes together. In cases where changes
245conflict, manual intervention may be required to complete the
246merge.
247+
Junio C Hamano3f680f32009-11-16 02:10:54248As a noun: unless it is a <<def_fast_forward,fast-forward>>, a
Junio C Hamano75485c82007-05-19 04:20:33249successful merge results in the creation of a new <<def_commit,commit>>
250representing the result of the merge, and having as
251<<def_parent,parents>> the tips of the merged <<def_branch,branches>>.
252This commit is referred to as a "merge commit", or sometimes just a
253"merge".
Junio C Hamano1a4e8412005-12-27 08:17:23254
Junio C Hamano3d5b41f2007-03-26 02:33:41255[[def_object]]object::
Junio C Hamano076ffcc2013-02-06 05:13:21256The unit of storage in Git. It is uniquely identified by the
Junio C Hamanoe3f080d2013-04-22 02:27:13257<<def_SHA1,SHA-1>> of its contents. Consequently, an
Junio C Hamano75485c82007-05-19 04:20:33258object can not be changed.
Junio C Hamano1a4e8412005-12-27 08:17:23259
Junio C Hamano3d5b41f2007-03-26 02:33:41260[[def_object_database]]object database::
261Stores a set of "objects", and an individual <<def_object,object>> is
262identified by its <<def_object_name,object name>>. The objects usually
263live in `$GIT_DIR/objects/`.
Junio C Hamano1a4e8412005-12-27 08:17:23264
Junio C Hamano3d5b41f2007-03-26 02:33:41265[[def_object_identifier]]object identifier::
266Synonym for <<def_object_name,object name>>.
Junio C Hamano1a4e8412005-12-27 08:17:23267
Junio C Hamano3d5b41f2007-03-26 02:33:41268[[def_object_name]]object name::
Junio C Hamanoe3f080d2013-04-22 02:27:13269The unique identifier of an <<def_object,object>>. The
270object name is usually represented by a 40 character
271hexadecimal string. Also colloquially called <<def_SHA1,SHA-1>>.
Junio C Hamano1a4e8412005-12-27 08:17:23272
Junio C Hamano3d5b41f2007-03-26 02:33:41273[[def_object_type]]object type::
Junio C Hamano9e1793f2008-06-02 07:31:16274One of the identifiers "<<def_commit_object,commit>>",
275"<<def_tree_object,tree>>", "<<def_tag_object,tag>>" or
276"<<def_blob_object,blob>>" describing the type of an
277<<def_object,object>>.
Junio C Hamano1a4e8412005-12-27 08:17:23278
Junio C Hamano3d5b41f2007-03-26 02:33:41279[[def_octopus]]octopus::
Junio C Hamanoe3f080d2013-04-22 02:27:13280To <<def_merge,merge>> more than two <<def_branch,branches>>.
Junio C Hamano88a3a072006-05-04 08:01:43281
Junio C Hamano3d5b41f2007-03-26 02:33:41282[[def_origin]]origin::
283The default upstream <<def_repository,repository>>. Most projects have
284at least one upstream project which they track. By default
Junio C Hamano75485c82007-05-19 04:20:33285'origin' is used for that purpose. New upstream updates
Junio C Hamano8401f142013-07-12 22:47:46286will be fetched into <<def_remote_tracking_branch,remote-tracking branches>> named
Junio C Hamanod3361ad2007-01-01 03:20:24287origin/name-of-upstream-branch, which you can see using
Junio C Hamanoea82cff2009-03-18 01:54:48288`git branch -r`.
Junio C Hamano88a3a072006-05-04 08:01:43289
Junio C Hamano6b7d2152019-04-16 12:51:15290[[def_overlay]]overlay::
291Only update and add files to the working directory, but don't
292delete them, similar to how 'cp -R' would update the contents
293in the destination directory. This is the default mode in a
294<<def_checkout,checkout>> when checking out files from the
295<<def_index,index>> or a <<def_tree-ish,tree-ish>>. In
296contrast, no-overlay mode also deletes tracked files not
297present in the source, similar to 'rsync --delete'.
298
Junio C Hamano3d5b41f2007-03-26 02:33:41299[[def_pack]]pack::
300A set of objects which have been compressed into one file (to save space
301or to transmit them efficiently).
Junio C Hamano88a3a072006-05-04 08:01:43302
Junio C Hamano3d5b41f2007-03-26 02:33:41303[[def_pack_index]]pack index::
Junio C Hamano88a3a072006-05-04 08:01:43304The list of identifiers, and other information, of the objects in a
Junio C Hamano3d5b41f2007-03-26 02:33:41305<<def_pack,pack>>, to assist in efficiently accessing the contents of a
Junio C Hamano75485c82007-05-19 04:20:33306pack.
Junio C Hamano1a4e8412005-12-27 08:17:23307
Junio C Hamano63c2bc92011-02-28 06:41:28308[[def_pathspec]]pathspec::
Junio C Hamanoe3f080d2013-04-22 02:27:13309Pattern used to limit paths in Git commands.
Junio C Hamano63c2bc92011-02-28 06:41:28310+
311Pathspecs are used on the command line of "git ls-files", "git
Junio C Hamano2a294cd2011-05-23 23:06:31312ls-tree", "git add", "git grep", "git diff", "git checkout",
313and many other commands to
Junio C Hamano63c2bc92011-02-28 06:41:28314limit the scope of operations to some subset of the tree or
315worktree. See the documentation of each command for whether
316paths are relative to the current directory or toplevel. The
317pathspec syntax is as follows:
Junio C Hamanoe3f080d2013-04-22 02:27:13318+
319--
Junio C Hamano63c2bc92011-02-28 06:41:28320
321* any path matches itself
322* the pathspec up to the last slash represents a
323 directory prefix. The scope of that pathspec is
324 limited to that subtree.
325* the rest of the pathspec is a pattern for the remainder
326 of the pathname. Paths relative to the directory
327 prefix will be matched against that pattern using fnmatch(3);
328 in particular, '*' and '?' _can_ match directory separators.
Junio C Hamanoe3f080d2013-04-22 02:27:13329
330--
Junio C Hamano63c2bc92011-02-28 06:41:28331+
332For example, Documentation/*.jpg will match all .jpg files
333in the Documentation subtree,
334including Documentation/chapter_1/figure_1.jpg.
Junio C Hamano2a294cd2011-05-23 23:06:31335+
336A pathspec that begins with a colon `:` has special meaning. In the
337short form, the leading colon `:` is followed by zero or more "magic
338signature" letters (which optionally is terminated by another colon `:`),
Junio C Hamano21bc18b2014-01-10 20:33:07339and the remainder is the pattern to match against the path.
340The "magic signature" consists of ASCII symbols that are neither
Junio C Hamanofb5ffde2014-11-04 22:38:56341alphanumeric, glob, regex special characters nor colon.
Junio C Hamano21bc18b2014-01-10 20:33:07342The optional colon that terminates the "magic signature" can be
343omitted if the pattern begins with a character that does not belong to
344"magic signature" symbol set and is not a colon.
Junio C Hamano2a294cd2011-05-23 23:06:31345+
Junio C Hamanoea1ac8d2018-07-18 20:16:48346In the long form, the leading colon `:` is followed by an open
Junio C Hamano2a294cd2011-05-23 23:06:31347parenthesis `(`, a comma-separated list of zero or more "magic words",
348and a close parentheses `)`, and the remainder is the pattern to match
349against the path.
350+
Junio C Hamano21bc18b2014-01-10 20:33:07351A pathspec with only a colon means "there is no pathspec". This form
352should not be combined with other pathspec.
Junio C Hamano8eac2682013-09-09 22:35:20353+
354--
Junio C Hamano21bc18b2014-01-10 20:33:07355top;;
356The magic word `top` (magic signature: `/`) makes the pattern
357match from the root of the working tree, even when you are
358running the command from inside a subdirectory.
Junio C Hamano8eac2682013-09-09 22:35:20359
360literal;;
361Wildcards in the pattern such as `*` or `?` are treated
362as literal characters.
363
364icase;;
365Case insensitive match.
366
367glob;;
368Git treats the pattern as a shell glob suitable for
369consumption by fnmatch(3) with the FNM_PATHNAME flag:
370wildcards in the pattern will not match a / in the pathname.
371For example, "Documentation/{asterisk}.html" matches
372"Documentation/git.html" but not "Documentation/ppc/ppc.html"
373or "tools/perf/Documentation/perf.html".
374+
375Two consecutive asterisks ("`**`") in patterns matched against
376full pathname may have special meaning:
377
378 - A leading "`**`" followed by a slash means match in all
379 directories. For example, "`**/foo`" matches file or directory
Junio C Hamanob73af6c2013-12-03 22:07:11380 "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`"
Junio C Hamano8eac2682013-09-09 22:35:20381 matches file or directory "`bar`" anywhere that is directly
382 under directory "`foo`".
383
Junio C Hamanob73af6c2013-12-03 22:07:11384 - A trailing "`/**`" matches everything inside. For example,
385 "`abc/**`" matches all files inside directory "abc", relative
Junio C Hamano8eac2682013-09-09 22:35:20386 to the location of the `.gitignore` file, with infinite depth.
387
388 - A slash followed by two consecutive asterisks then a slash
389 matches zero or more directories. For example, "`a/**/b`"
390 matches "`a/b`", "`a/x/b`", "`a/x/y/b`" and so on.
391
392 - Other consecutive asterisks are considered invalid.
393+
394Glob magic is incompatible with literal magic.
Junio C Hamano21bc18b2014-01-10 20:33:07395
Junio C Hamano3d4a66d2017-03-17 21:07:26396attr;;
397After `attr:` comes a space separated list of "attribute
398requirements", all of which must be met in order for the
399path to be considered a match; this is in addition to the
400usual non-magic pathspec pattern matching.
401See linkgit:gitattributes[5].
402+
403Each of the attribute requirements for the path takes one of
404these forms:
405
406- "`ATTR`" requires that the attribute `ATTR` be set.
407
408- "`-ATTR`" requires that the attribute `ATTR` be unset.
409
410- "`ATTR=VALUE`" requires that the attribute `ATTR` be
411 set to the string `VALUE`.
412
413- "`!ATTR`" requires that the attribute `ATTR` be
414 unspecified.
415+
Junio C Hamanoace33e42019-01-18 23:16:05416Note that when matching against a tree object, attributes are still
417obtained from working tree, not from the given tree object.
Junio C Hamano3d4a66d2017-03-17 21:07:26418
Junio C Hamano21bc18b2014-01-10 20:33:07419exclude;;
420After a path matches any non-exclude pathspec, it will be run
Junio C Hamano139b7d12017-10-03 07:10:59421through all exclude pathspecs (magic signature: `!` or its
Junio C Hamanocbe0eb22017-02-27 23:37:49422synonym `^`). If it matches, the path is ignored. When there
423is no non-exclude pathspec, the exclusion is applied to the
424result set as if invoked without any pathspec.
Junio C Hamano8eac2682013-09-09 22:35:20425--
Junio C Hamano2a294cd2011-05-23 23:06:31426
Junio C Hamano3d5b41f2007-03-26 02:33:41427[[def_parent]]parent::
428A <<def_commit_object,commit object>> contains a (possibly empty) list
429of the logical predecessor(s) in the line of development, i.e. its
430parents.
Junio C Hamano1a4e8412005-12-27 08:17:23431
Junio C Hamano3d5b41f2007-03-26 02:33:41432[[def_pickaxe]]pickaxe::
433The term <<def_pickaxe,pickaxe>> refers to an option to the diffcore
434routines that help select changes that add or delete a given text
Junio C Hamano764a6672007-10-23 01:23:31435string. With the `--pickaxe-all` option, it can be used to view the full
Junio C Hamano3d5b41f2007-03-26 02:33:41436<<def_changeset,changeset>> that introduced or removed, say, a
Junio C Hamano35738e82008-01-07 07:55:46437particular line of text. See linkgit:git-diff[1].
Junio C Hamano1a4e8412005-12-27 08:17:23438
Junio C Hamano3d5b41f2007-03-26 02:33:41439[[def_plumbing]]plumbing::
Junio C Hamano076ffcc2013-02-06 05:13:21440Cute name for <<def_core_git,core Git>>.
Junio C Hamano1a4e8412005-12-27 08:17:23441
Junio C Hamano3d5b41f2007-03-26 02:33:41442[[def_porcelain]]porcelain::
443Cute name for programs and program suites depending on
Junio C Hamano076ffcc2013-02-06 05:13:21444<<def_core_git,core Git>>, presenting a high level access to
445core Git. Porcelains expose more of a <<def_SCM,SCM>>
Junio C Hamano3d5b41f2007-03-26 02:33:41446interface than the <<def_plumbing,plumbing>>.
Junio C Hamano1a4e8412005-12-27 08:17:23447
Junio C Hamano37e467d2015-08-25 23:25:56448[[def_per_worktree_ref]]per-worktree ref::
449Refs that are per-<<def_working_tree,worktree>>, rather than
Junio C Hamano1eb56092015-10-05 20:39:53450global. This is presently only <<def_HEAD,HEAD>> and any refs
451that start with `refs/bisect/`, but might later include other
452unusual refs.
Junio C Hamano37e467d2015-08-25 23:25:56453
454[[def_pseudoref]]pseudoref::
455Pseudorefs are a class of files under `$GIT_DIR` which behave
456like refs for the purposes of rev-parse, but which are treated
457specially by git. Pseudorefs both have names that are all-caps,
458and always start with a line consisting of a
459<<def_SHA1,SHA-1>> followed by whitespace. So, HEAD is not a
460pseudoref, because it is sometimes a symbolic ref. They might
461optionally contain some additional data. `MERGE_HEAD` and
462`CHERRY_PICK_HEAD` are examples. Unlike
463<<def_per_worktree_ref,per-worktree refs>>, these files cannot
464be symbolic refs, and never have reflogs. They also cannot be
465updated through the normal ref update machinery. Instead,
466they are updated by directly writing to the files. However,
467they can be read as if they were refs, so `git rev-parse
468MERGE_HEAD` will work.
469
Junio C Hamano3d5b41f2007-03-26 02:33:41470[[def_pull]]pull::
471Pulling a <<def_branch,branch>> means to <<def_fetch,fetch>> it and
Junio C Hamano35738e82008-01-07 07:55:46472<<def_merge,merge>> it. See also linkgit:git-pull[1].
Junio C Hamano1a4e8412005-12-27 08:17:23473
Junio C Hamano3d5b41f2007-03-26 02:33:41474[[def_push]]push::
Junio C Hamano75485c82007-05-19 04:20:33475Pushing a <<def_branch,branch>> means to get the branch's
Junio C Hamano3d5b41f2007-03-26 02:33:41476<<def_head_ref,head ref>> from a remote <<def_repository,repository>>,
Junio C Hamanoccb82522018-05-08 07:52:09477find out if it is an ancestor to the branch's local
Junio C Hamano764a6672007-10-23 01:23:31478head ref, and in that case, putting all
Junio C Hamano3d5b41f2007-03-26 02:33:41479objects, which are <<def_reachable,reachable>> from the local
Junio C Hamano75485c82007-05-19 04:20:33480head ref, and which are missing from the remote
481repository, into the remote
Junio C Hamano3d5b41f2007-03-26 02:33:41482<<def_object_database,object database>>, and updating the remote
Junio C Hamano75485c82007-05-19 04:20:33483head ref. If the remote <<def_head,head>> is not an
484ancestor to the local head, the push fails.
Junio C Hamano1a4e8412005-12-27 08:17:23485
Junio C Hamano3d5b41f2007-03-26 02:33:41486[[def_reachable]]reachable::
487All of the ancestors of a given <<def_commit,commit>> are said to be
Junio C Hamano75485c82007-05-19 04:20:33488"reachable" from that commit. More
489generally, one <<def_object,object>> is reachable from
Junio C Hamano3d5b41f2007-03-26 02:33:41490another if we can reach the one from the other by a <<def_chain,chain>>
491that follows <<def_tag,tags>> to whatever they tag,
492<<def_commit_object,commits>> to their parents or trees, and
493<<def_tree_object,trees>> to the trees or <<def_blob_object,blobs>>
494that they contain.
Junio C Hamanof3e80c02006-01-11 00:54:55495
Junio C Hamano3d5b41f2007-03-26 02:33:41496[[def_rebase]]rebase::
497To reapply a series of changes from a <<def_branch,branch>> to a
498different base, and reset the <<def_head,head>> of that branch
499to the result.
Junio C Hamanof3e80c02006-01-11 00:54:55500
Junio C Hamano3d5b41f2007-03-26 02:33:41501[[def_ref]]ref::
Junio C Hamanoe6f28d02013-09-17 21:34:00502A name that begins with `refs/` (e.g. `refs/heads/master`)
503that points to an <<def_object_name,object name>> or another
504ref (the latter is called a <<def_symref,symbolic ref>>).
505For convenience, a ref can sometimes be abbreviated when used
506as an argument to a Git command; see linkgit:gitrevisions[7]
507for details.
508Refs are stored in the <<def_repository,repository>>.
509+
510The ref namespace is hierarchical.
511Different subhierarchies are used for different purposes (e.g. the
512`refs/heads/` hierarchy is used to represent local branches).
513+
514There are a few special-purpose refs that do not begin with `refs/`.
515The most notable example is `HEAD`.
Junio C Hamano1a4e8412005-12-27 08:17:23516
Junio C Hamanobb0f4042007-07-04 06:41:40517[[def_reflog]]reflog::
518A reflog shows the local "history" of a ref. In other words,
519it can tell you what the 3rd last revision in _this_ repository
520was, and what was the current state in _this_ repository,
Junio C Hamano35738e82008-01-07 07:55:46521yesterday 9:14pm. See linkgit:git-reflog[1] for details.
Junio C Hamanobb0f4042007-07-04 06:41:40522
Junio C Hamano3d5b41f2007-03-26 02:33:41523[[def_refspec]]refspec::
Junio C Hamano36460982007-05-27 04:29:12524A "refspec" is used by <<def_fetch,fetch>> and
Junio C Hamano75485c82007-05-19 04:20:33525<<def_push,push>> to describe the mapping between remote
Junio C Hamanoe3f080d2013-04-22 02:27:13526<<def_ref,ref>> and local ref.
Junio C Hamano88a3a072006-05-04 08:01:43527
Junio C Hamano8c5d5942015-06-11 19:37:48528[[def_remote]]remote repository::
529A <<def_repository,repository>> which is used to track the same
530project but resides somewhere else. To communicate with remotes,
531see <<def_fetch,fetch>> or <<def_push,push>>.
532
Junio C Hamano97bcb482010-11-25 03:16:07533[[def_remote_tracking_branch]]remote-tracking branch::
Junio C Hamanoc7102962013-05-29 23:57:17534A <<def_ref,ref>> that is used to follow changes from another
535<<def_repository,repository>>. It typically looks like
536'refs/remotes/foo/bar' (indicating that it tracks a branch named
537'bar' in a remote named 'foo'), and matches the right-hand-side of
538a configured fetch <<def_refspec,refspec>>. A remote-tracking
539branch should not contain direct modifications or have local
540commits made to it.
Junio C Hamano97bcb482010-11-25 03:16:07541
Junio C Hamano3d5b41f2007-03-26 02:33:41542[[def_repository]]repository::
Junio C Hamano36460982007-05-27 04:29:12543A collection of <<def_ref,refs>> together with an
Junio C Hamano75485c82007-05-19 04:20:33544<<def_object_database,object database>> containing all objects
545which are <<def_reachable,reachable>> from the refs, possibly
Junio C Hamano36460982007-05-27 04:29:12546accompanied by meta data from one or more <<def_porcelain,porcelains>>. A
547repository can share an object database with other repositories
548via <<def_alternate_object_database,alternates mechanism>>.
Junio C Hamano88a3a072006-05-04 08:01:43549
Junio C Hamano3d5b41f2007-03-26 02:33:41550[[def_resolve]]resolve::
551The action of fixing up manually what a failed automatic
552<<def_merge,merge>> left behind.
Junio C Hamano88a3a072006-05-04 08:01:43553
Junio C Hamano3d5b41f2007-03-26 02:33:41554[[def_revision]]revision::
Junio C Hamanof26c77e2013-04-27 00:06:04555Synonym for <<def_commit,commit>> (the noun).
Junio C Hamano88a3a072006-05-04 08:01:43556
Junio C Hamano3d5b41f2007-03-26 02:33:41557[[def_rewind]]rewind::
558To throw away part of the development, i.e. to assign the
559<<def_head,head>> to an earlier <<def_revision,revision>>.
Junio C Hamano88a3a072006-05-04 08:01:43560
Junio C Hamano3d5b41f2007-03-26 02:33:41561[[def_SCM]]SCM::
Junio C Hamano88a3a072006-05-04 08:01:43562Source code management (tool).
563
Junio C Hamanoe3f080d2013-04-22 02:27:13564[[def_SHA1]]SHA-1::
565"Secure Hash Algorithm 1"; a cryptographic hash function.
566In the context of Git used as a synonym for <<def_object_name,object name>>.
Junio C Hamano88a3a072006-05-04 08:01:43567
Junio C Hamano4e6ba272016-01-20 23:23:19568[[def_shallow_clone]]shallow clone::
569Mostly a synonym to <<def_shallow_repository,shallow repository>>
570but the phrase makes it more explicit that it was created by
571running `git clone --depth=...` command.
572
Junio C Hamano3d5b41f2007-03-26 02:33:41573[[def_shallow_repository]]shallow repository::
Junio C Hamano36460982007-05-27 04:29:12574A shallow <<def_repository,repository>> has an incomplete
575history some of whose <<def_commit,commits>> have <<def_parent,parents>> cauterized away (in other
Junio C Hamano076ffcc2013-02-06 05:13:21576words, Git is told to pretend that these commits do not have the
Junio C Hamano3d5b41f2007-03-26 02:33:41577parents, even though they are recorded in the <<def_commit_object,commit
578object>>). This is sometimes useful when you are interested only in the
579recent history of a project even though the real history recorded in the
Junio C Hamano75485c82007-05-19 04:20:33580upstream is much larger. A shallow repository
Junio C Hamano35738e82008-01-07 07:55:46581is created by giving the `--depth` option to linkgit:git-clone[1], and
582its history can be later deepened with linkgit:git-fetch[1].
Junio C Hamano4f9a6052007-01-17 20:25:16583
Junio C Hamano967cda72017-06-30 21:49:53584[[def_stash]]stash entry::
585An <<def_object,object>> used to temporarily store the contents of a
586<<def_dirty,dirty>> working directory and the index for future reuse.
587
Junio C Hamano8c5d5942015-06-11 19:37:48588[[def_submodule]]submodule::
589A <<def_repository,repository>> that holds the history of a
590separate project inside another repository (the latter of
591which is called <<def_superproject, superproject>>).
592
593[[def_superproject]]superproject::
594A <<def_repository,repository>> that references repositories
595of other projects in its working tree as <<def_submodule,submodules>>.
596The superproject knows about the names of (but does not hold
597copies of) commit objects of the contained submodules.
598
Junio C Hamano3d5b41f2007-03-26 02:33:41599[[def_symref]]symref::
Junio C Hamanoe3f080d2013-04-22 02:27:13600Symbolic reference: instead of containing the <<def_SHA1,SHA-1>>
Junio C Hamano75485c82007-05-19 04:20:33601id itself, it is of the format 'ref: refs/some/thing' and when
602referenced, it recursively dereferences to this reference.
603'<<def_HEAD,HEAD>>' is a prime example of a symref. Symbolic
Junio C Hamano35738e82008-01-07 07:55:46604references are manipulated with the linkgit:git-symbolic-ref[1]
Junio C Hamano75485c82007-05-19 04:20:33605command.
Junio C Hamano3a971022006-11-18 22:17:58606
Junio C Hamano3d5b41f2007-03-26 02:33:41607[[def_tag]]tag::
Junio C Hamano360e3a12011-07-13 23:51:56608A <<def_ref,ref>> under `refs/tags/` namespace that points to an
609object of an arbitrary type (typically a tag points to either a
610<<def_tag_object,tag>> or a <<def_commit_object,commit object>>).
611In contrast to a <<def_head,head>>, a tag is not updated by
Junio C Hamano076ffcc2013-02-06 05:13:21612the `commit` command. A Git tag has nothing to do with a Lisp
Junio C Hamano360e3a12011-07-13 23:51:56613tag (which would be called an <<def_object_type,object type>>
Junio C Hamano076ffcc2013-02-06 05:13:21614in Git's context). A tag is most typically used to mark a particular
Junio C Hamano360e3a12011-07-13 23:51:56615point in the commit ancestry <<def_chain,chain>>.
Junio C Hamano88a3a072006-05-04 08:01:43616
Junio C Hamano3d5b41f2007-03-26 02:33:41617[[def_tag_object]]tag object::
618An <<def_object,object>> containing a <<def_ref,ref>> pointing to
Junio C Hamano75485c82007-05-19 04:20:33619another object, which can contain a message just like a
Junio C Hamano3d5b41f2007-03-26 02:33:41620<<def_commit_object,commit object>>. It can also contain a (PGP)
Junio C Hamano36460982007-05-27 04:29:12621signature, in which case it is called a "signed tag object".
Junio C Hamano88a3a072006-05-04 08:01:43622
Junio C Hamano3d5b41f2007-03-26 02:33:41623[[def_topic_branch]]topic branch::
Junio C Hamano076ffcc2013-02-06 05:13:21624A regular Git <<def_branch,branch>> that is used by a developer to
Junio C Hamano3d5b41f2007-03-26 02:33:41625identify a conceptual line of development. Since branches are very easy
626and inexpensive, it is often desirable to have several small branches
627that each contain very well defined concepts or small incremental yet
628related changes.
Junio C Hamano88a3a072006-05-04 08:01:43629
Junio C Hamano3d5b41f2007-03-26 02:33:41630[[def_tree]]tree::
631Either a <<def_working_tree,working tree>>, or a <<def_tree_object,tree
Junio C Hamano36460982007-05-27 04:29:12632object>> together with the dependent <<def_blob_object,blob>> and tree objects
Junio C Hamano75485c82007-05-19 04:20:33633(i.e. a stored representation of a working tree).
Junio C Hamano1a4e8412005-12-27 08:17:23634
Junio C Hamano3d5b41f2007-03-26 02:33:41635[[def_tree_object]]tree object::
636An <<def_object,object>> containing a list of file names and modes along
637with refs to the associated blob and/or tree objects. A
638<<def_tree,tree>> is equivalent to a <<def_directory,directory>>.
Junio C Hamano1a4e8412005-12-27 08:17:23639
Junio C Hamanoe6f28d02013-09-17 21:34:00640[[def_tree-ish]]tree-ish (also treeish)::
641A <<def_tree_object,tree object>> or an <<def_object,object>>
642that can be recursively dereferenced to a tree object.
643Dereferencing a <<def_commit_object,commit object>> yields the
644tree object corresponding to the <<def_revision,revision>>'s
645top <<def_directory,directory>>.
646The following are all tree-ishes:
647a <<def_commit-ish,commit-ish>>,
648a tree object,
649a <<def_tag_object,tag object>> that points to a tree object,
650a tag object that points to a tag object that points to a tree
651object,
652etc.
Junio C Hamano1a4e8412005-12-27 08:17:23653
Junio C Hamano3d5b41f2007-03-26 02:33:41654[[def_unmerged_index]]unmerged index::
655An <<def_index,index>> which contains unmerged
656<<def_index_entry,index entries>>.
Junio C Hamano1a4e8412005-12-27 08:17:23657
Junio C Hamano3d5b41f2007-03-26 02:33:41658[[def_unreachable_object]]unreachable object::
659An <<def_object,object>> which is not <<def_reachable,reachable>> from a
660<<def_branch,branch>>, <<def_tag,tag>>, or any other reference.
Junio C Hamanoaa83a7d2007-03-05 02:37:29661
Junio C Hamano98e32c32009-04-13 02:39:53662[[def_upstream_branch]]upstream branch::
663The default <<def_branch,branch>> that is merged into the branch in
664question (or the branch in question is rebased onto). It is configured
665via branch.<name>.remote and branch.<name>.merge. If the upstream branch
666of 'A' is 'origin/B' sometimes we say "'A' is tracking 'origin/B'".
667
Junio C Hamano3d5b41f2007-03-26 02:33:41668[[def_working_tree]]working tree::
Junio C Hamanoc0e55e72009-10-10 00:56:29669The tree of actual checked out files. The working tree normally
670contains the contents of the <<def_HEAD,HEAD>> commit's tree,
671plus any local changes that you have made but not yet committed.