blob: 023ca95e7c39d88fcac832d73a7454e9fb71e5a1 [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 Hamano3d5b41f2007-03-26 02:33:41290[[def_pack]]pack::
291A set of objects which have been compressed into one file (to save space
292or to transmit them efficiently).
Junio C Hamano88a3a072006-05-04 08:01:43293
Junio C Hamano3d5b41f2007-03-26 02:33:41294[[def_pack_index]]pack index::
Junio C Hamano88a3a072006-05-04 08:01:43295The list of identifiers, and other information, of the objects in a
Junio C Hamano3d5b41f2007-03-26 02:33:41296<<def_pack,pack>>, to assist in efficiently accessing the contents of a
Junio C Hamano75485c82007-05-19 04:20:33297pack.
Junio C Hamano1a4e8412005-12-27 08:17:23298
Junio C Hamano63c2bc92011-02-28 06:41:28299[[def_pathspec]]pathspec::
Junio C Hamanoe3f080d2013-04-22 02:27:13300Pattern used to limit paths in Git commands.
Junio C Hamano63c2bc92011-02-28 06:41:28301+
302Pathspecs are used on the command line of "git ls-files", "git
Junio C Hamano2a294cd2011-05-23 23:06:31303ls-tree", "git add", "git grep", "git diff", "git checkout",
304and many other commands to
Junio C Hamano63c2bc92011-02-28 06:41:28305limit the scope of operations to some subset of the tree or
306worktree. See the documentation of each command for whether
307paths are relative to the current directory or toplevel. The
308pathspec syntax is as follows:
Junio C Hamanoe3f080d2013-04-22 02:27:13309+
310--
Junio C Hamano63c2bc92011-02-28 06:41:28311
312* any path matches itself
313* the pathspec up to the last slash represents a
314 directory prefix. The scope of that pathspec is
315 limited to that subtree.
316* the rest of the pathspec is a pattern for the remainder
317 of the pathname. Paths relative to the directory
318 prefix will be matched against that pattern using fnmatch(3);
319 in particular, '*' and '?' _can_ match directory separators.
Junio C Hamanoe3f080d2013-04-22 02:27:13320
321--
Junio C Hamano63c2bc92011-02-28 06:41:28322+
323For example, Documentation/*.jpg will match all .jpg files
324in the Documentation subtree,
325including Documentation/chapter_1/figure_1.jpg.
Junio C Hamano2a294cd2011-05-23 23:06:31326+
327A pathspec that begins with a colon `:` has special meaning. In the
328short form, the leading colon `:` is followed by zero or more "magic
329signature" letters (which optionally is terminated by another colon `:`),
Junio C Hamano21bc18b2014-01-10 20:33:07330and the remainder is the pattern to match against the path.
331The "magic signature" consists of ASCII symbols that are neither
Junio C Hamanofb5ffde2014-11-04 22:38:56332alphanumeric, glob, regex special characters nor colon.
Junio C Hamano21bc18b2014-01-10 20:33:07333The optional colon that terminates the "magic signature" can be
334omitted if the pattern begins with a character that does not belong to
335"magic signature" symbol set and is not a colon.
Junio C Hamano2a294cd2011-05-23 23:06:31336+
Junio C Hamanoea1ac8d2018-07-18 20:16:48337In the long form, the leading colon `:` is followed by an open
Junio C Hamano2a294cd2011-05-23 23:06:31338parenthesis `(`, a comma-separated list of zero or more "magic words",
339and a close parentheses `)`, and the remainder is the pattern to match
340against the path.
341+
Junio C Hamano21bc18b2014-01-10 20:33:07342A pathspec with only a colon means "there is no pathspec". This form
343should not be combined with other pathspec.
Junio C Hamano8eac2682013-09-09 22:35:20344+
345--
Junio C Hamano21bc18b2014-01-10 20:33:07346top;;
347The magic word `top` (magic signature: `/`) makes the pattern
348match from the root of the working tree, even when you are
349running the command from inside a subdirectory.
Junio C Hamano8eac2682013-09-09 22:35:20350
351literal;;
352Wildcards in the pattern such as `*` or `?` are treated
353as literal characters.
354
355icase;;
356Case insensitive match.
357
358glob;;
359Git treats the pattern as a shell glob suitable for
360consumption by fnmatch(3) with the FNM_PATHNAME flag:
361wildcards in the pattern will not match a / in the pathname.
362For example, "Documentation/{asterisk}.html" matches
363"Documentation/git.html" but not "Documentation/ppc/ppc.html"
364or "tools/perf/Documentation/perf.html".
365+
366Two consecutive asterisks ("`**`") in patterns matched against
367full pathname may have special meaning:
368
369 - A leading "`**`" followed by a slash means match in all
370 directories. For example, "`**/foo`" matches file or directory
Junio C Hamanob73af6c2013-12-03 22:07:11371 "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`"
Junio C Hamano8eac2682013-09-09 22:35:20372 matches file or directory "`bar`" anywhere that is directly
373 under directory "`foo`".
374
Junio C Hamanob73af6c2013-12-03 22:07:11375 - A trailing "`/**`" matches everything inside. For example,
376 "`abc/**`" matches all files inside directory "abc", relative
Junio C Hamano8eac2682013-09-09 22:35:20377 to the location of the `.gitignore` file, with infinite depth.
378
379 - A slash followed by two consecutive asterisks then a slash
380 matches zero or more directories. For example, "`a/**/b`"
381 matches "`a/b`", "`a/x/b`", "`a/x/y/b`" and so on.
382
383 - Other consecutive asterisks are considered invalid.
384+
385Glob magic is incompatible with literal magic.
Junio C Hamano21bc18b2014-01-10 20:33:07386
Junio C Hamano3d4a66d2017-03-17 21:07:26387attr;;
388After `attr:` comes a space separated list of "attribute
389requirements", all of which must be met in order for the
390path to be considered a match; this is in addition to the
391usual non-magic pathspec pattern matching.
392See linkgit:gitattributes[5].
393+
394Each of the attribute requirements for the path takes one of
395these forms:
396
397- "`ATTR`" requires that the attribute `ATTR` be set.
398
399- "`-ATTR`" requires that the attribute `ATTR` be unset.
400
401- "`ATTR=VALUE`" requires that the attribute `ATTR` be
402 set to the string `VALUE`.
403
404- "`!ATTR`" requires that the attribute `ATTR` be
405 unspecified.
406+
Junio C Hamanoace33e42019-01-18 23:16:05407Note that when matching against a tree object, attributes are still
408obtained from working tree, not from the given tree object.
Junio C Hamano3d4a66d2017-03-17 21:07:26409
Junio C Hamano21bc18b2014-01-10 20:33:07410exclude;;
411After a path matches any non-exclude pathspec, it will be run
Junio C Hamano139b7d12017-10-03 07:10:59412through all exclude pathspecs (magic signature: `!` or its
Junio C Hamanocbe0eb22017-02-27 23:37:49413synonym `^`). If it matches, the path is ignored. When there
414is no non-exclude pathspec, the exclusion is applied to the
415result set as if invoked without any pathspec.
Junio C Hamano8eac2682013-09-09 22:35:20416--
Junio C Hamano2a294cd2011-05-23 23:06:31417
Junio C Hamano3d5b41f2007-03-26 02:33:41418[[def_parent]]parent::
419A <<def_commit_object,commit object>> contains a (possibly empty) list
420of the logical predecessor(s) in the line of development, i.e. its
421parents.
Junio C Hamano1a4e8412005-12-27 08:17:23422
Junio C Hamano3d5b41f2007-03-26 02:33:41423[[def_pickaxe]]pickaxe::
424The term <<def_pickaxe,pickaxe>> refers to an option to the diffcore
425routines that help select changes that add or delete a given text
Junio C Hamano764a6672007-10-23 01:23:31426string. With the `--pickaxe-all` option, it can be used to view the full
Junio C Hamano3d5b41f2007-03-26 02:33:41427<<def_changeset,changeset>> that introduced or removed, say, a
Junio C Hamano35738e82008-01-07 07:55:46428particular line of text. See linkgit:git-diff[1].
Junio C Hamano1a4e8412005-12-27 08:17:23429
Junio C Hamano3d5b41f2007-03-26 02:33:41430[[def_plumbing]]plumbing::
Junio C Hamano076ffcc2013-02-06 05:13:21431Cute name for <<def_core_git,core Git>>.
Junio C Hamano1a4e8412005-12-27 08:17:23432
Junio C Hamano3d5b41f2007-03-26 02:33:41433[[def_porcelain]]porcelain::
434Cute name for programs and program suites depending on
Junio C Hamano076ffcc2013-02-06 05:13:21435<<def_core_git,core Git>>, presenting a high level access to
436core Git. Porcelains expose more of a <<def_SCM,SCM>>
Junio C Hamano3d5b41f2007-03-26 02:33:41437interface than the <<def_plumbing,plumbing>>.
Junio C Hamano1a4e8412005-12-27 08:17:23438
Junio C Hamano37e467d2015-08-25 23:25:56439[[def_per_worktree_ref]]per-worktree ref::
440Refs that are per-<<def_working_tree,worktree>>, rather than
Junio C Hamano1eb56092015-10-05 20:39:53441global. This is presently only <<def_HEAD,HEAD>> and any refs
442that start with `refs/bisect/`, but might later include other
443unusual refs.
Junio C Hamano37e467d2015-08-25 23:25:56444
445[[def_pseudoref]]pseudoref::
446Pseudorefs are a class of files under `$GIT_DIR` which behave
447like refs for the purposes of rev-parse, but which are treated
448specially by git. Pseudorefs both have names that are all-caps,
449and always start with a line consisting of a
450<<def_SHA1,SHA-1>> followed by whitespace. So, HEAD is not a
451pseudoref, because it is sometimes a symbolic ref. They might
452optionally contain some additional data. `MERGE_HEAD` and
453`CHERRY_PICK_HEAD` are examples. Unlike
454<<def_per_worktree_ref,per-worktree refs>>, these files cannot
455be symbolic refs, and never have reflogs. They also cannot be
456updated through the normal ref update machinery. Instead,
457they are updated by directly writing to the files. However,
458they can be read as if they were refs, so `git rev-parse
459MERGE_HEAD` will work.
460
Junio C Hamano3d5b41f2007-03-26 02:33:41461[[def_pull]]pull::
462Pulling a <<def_branch,branch>> means to <<def_fetch,fetch>> it and
Junio C Hamano35738e82008-01-07 07:55:46463<<def_merge,merge>> it. See also linkgit:git-pull[1].
Junio C Hamano1a4e8412005-12-27 08:17:23464
Junio C Hamano3d5b41f2007-03-26 02:33:41465[[def_push]]push::
Junio C Hamano75485c82007-05-19 04:20:33466Pushing a <<def_branch,branch>> means to get the branch's
Junio C Hamano3d5b41f2007-03-26 02:33:41467<<def_head_ref,head ref>> from a remote <<def_repository,repository>>,
Junio C Hamanoccb82522018-05-08 07:52:09468find out if it is an ancestor to the branch's local
Junio C Hamano764a6672007-10-23 01:23:31469head ref, and in that case, putting all
Junio C Hamano3d5b41f2007-03-26 02:33:41470objects, which are <<def_reachable,reachable>> from the local
Junio C Hamano75485c82007-05-19 04:20:33471head ref, and which are missing from the remote
472repository, into the remote
Junio C Hamano3d5b41f2007-03-26 02:33:41473<<def_object_database,object database>>, and updating the remote
Junio C Hamano75485c82007-05-19 04:20:33474head ref. If the remote <<def_head,head>> is not an
475ancestor to the local head, the push fails.
Junio C Hamano1a4e8412005-12-27 08:17:23476
Junio C Hamano3d5b41f2007-03-26 02:33:41477[[def_reachable]]reachable::
478All of the ancestors of a given <<def_commit,commit>> are said to be
Junio C Hamano75485c82007-05-19 04:20:33479"reachable" from that commit. More
480generally, one <<def_object,object>> is reachable from
Junio C Hamano3d5b41f2007-03-26 02:33:41481another if we can reach the one from the other by a <<def_chain,chain>>
482that follows <<def_tag,tags>> to whatever they tag,
483<<def_commit_object,commits>> to their parents or trees, and
484<<def_tree_object,trees>> to the trees or <<def_blob_object,blobs>>
485that they contain.
Junio C Hamanof3e80c02006-01-11 00:54:55486
Junio C Hamano3d5b41f2007-03-26 02:33:41487[[def_rebase]]rebase::
488To reapply a series of changes from a <<def_branch,branch>> to a
489different base, and reset the <<def_head,head>> of that branch
490to the result.
Junio C Hamanof3e80c02006-01-11 00:54:55491
Junio C Hamano3d5b41f2007-03-26 02:33:41492[[def_ref]]ref::
Junio C Hamanoe6f28d02013-09-17 21:34:00493A name that begins with `refs/` (e.g. `refs/heads/master`)
494that points to an <<def_object_name,object name>> or another
495ref (the latter is called a <<def_symref,symbolic ref>>).
496For convenience, a ref can sometimes be abbreviated when used
497as an argument to a Git command; see linkgit:gitrevisions[7]
498for details.
499Refs are stored in the <<def_repository,repository>>.
500+
501The ref namespace is hierarchical.
502Different subhierarchies are used for different purposes (e.g. the
503`refs/heads/` hierarchy is used to represent local branches).
504+
505There are a few special-purpose refs that do not begin with `refs/`.
506The most notable example is `HEAD`.
Junio C Hamano1a4e8412005-12-27 08:17:23507
Junio C Hamanobb0f4042007-07-04 06:41:40508[[def_reflog]]reflog::
509A reflog shows the local "history" of a ref. In other words,
510it can tell you what the 3rd last revision in _this_ repository
511was, and what was the current state in _this_ repository,
Junio C Hamano35738e82008-01-07 07:55:46512yesterday 9:14pm. See linkgit:git-reflog[1] for details.
Junio C Hamanobb0f4042007-07-04 06:41:40513
Junio C Hamano3d5b41f2007-03-26 02:33:41514[[def_refspec]]refspec::
Junio C Hamano36460982007-05-27 04:29:12515A "refspec" is used by <<def_fetch,fetch>> and
Junio C Hamano75485c82007-05-19 04:20:33516<<def_push,push>> to describe the mapping between remote
Junio C Hamanoe3f080d2013-04-22 02:27:13517<<def_ref,ref>> and local ref.
Junio C Hamano88a3a072006-05-04 08:01:43518
Junio C Hamano8c5d5942015-06-11 19:37:48519[[def_remote]]remote repository::
520A <<def_repository,repository>> which is used to track the same
521project but resides somewhere else. To communicate with remotes,
522see <<def_fetch,fetch>> or <<def_push,push>>.
523
Junio C Hamano97bcb482010-11-25 03:16:07524[[def_remote_tracking_branch]]remote-tracking branch::
Junio C Hamanoc7102962013-05-29 23:57:17525A <<def_ref,ref>> that is used to follow changes from another
526<<def_repository,repository>>. It typically looks like
527'refs/remotes/foo/bar' (indicating that it tracks a branch named
528'bar' in a remote named 'foo'), and matches the right-hand-side of
529a configured fetch <<def_refspec,refspec>>. A remote-tracking
530branch should not contain direct modifications or have local
531commits made to it.
Junio C Hamano97bcb482010-11-25 03:16:07532
Junio C Hamano3d5b41f2007-03-26 02:33:41533[[def_repository]]repository::
Junio C Hamano36460982007-05-27 04:29:12534A collection of <<def_ref,refs>> together with an
Junio C Hamano75485c82007-05-19 04:20:33535<<def_object_database,object database>> containing all objects
536which are <<def_reachable,reachable>> from the refs, possibly
Junio C Hamano36460982007-05-27 04:29:12537accompanied by meta data from one or more <<def_porcelain,porcelains>>. A
538repository can share an object database with other repositories
539via <<def_alternate_object_database,alternates mechanism>>.
Junio C Hamano88a3a072006-05-04 08:01:43540
Junio C Hamano3d5b41f2007-03-26 02:33:41541[[def_resolve]]resolve::
542The action of fixing up manually what a failed automatic
543<<def_merge,merge>> left behind.
Junio C Hamano88a3a072006-05-04 08:01:43544
Junio C Hamano3d5b41f2007-03-26 02:33:41545[[def_revision]]revision::
Junio C Hamanof26c77e2013-04-27 00:06:04546Synonym for <<def_commit,commit>> (the noun).
Junio C Hamano88a3a072006-05-04 08:01:43547
Junio C Hamano3d5b41f2007-03-26 02:33:41548[[def_rewind]]rewind::
549To throw away part of the development, i.e. to assign the
550<<def_head,head>> to an earlier <<def_revision,revision>>.
Junio C Hamano88a3a072006-05-04 08:01:43551
Junio C Hamano3d5b41f2007-03-26 02:33:41552[[def_SCM]]SCM::
Junio C Hamano88a3a072006-05-04 08:01:43553Source code management (tool).
554
Junio C Hamanoe3f080d2013-04-22 02:27:13555[[def_SHA1]]SHA-1::
556"Secure Hash Algorithm 1"; a cryptographic hash function.
557In the context of Git used as a synonym for <<def_object_name,object name>>.
Junio C Hamano88a3a072006-05-04 08:01:43558
Junio C Hamano4e6ba272016-01-20 23:23:19559[[def_shallow_clone]]shallow clone::
560Mostly a synonym to <<def_shallow_repository,shallow repository>>
561but the phrase makes it more explicit that it was created by
562running `git clone --depth=...` command.
563
Junio C Hamano3d5b41f2007-03-26 02:33:41564[[def_shallow_repository]]shallow repository::
Junio C Hamano36460982007-05-27 04:29:12565A shallow <<def_repository,repository>> has an incomplete
566history some of whose <<def_commit,commits>> have <<def_parent,parents>> cauterized away (in other
Junio C Hamano076ffcc2013-02-06 05:13:21567words, Git is told to pretend that these commits do not have the
Junio C Hamano3d5b41f2007-03-26 02:33:41568parents, even though they are recorded in the <<def_commit_object,commit
569object>>). This is sometimes useful when you are interested only in the
570recent history of a project even though the real history recorded in the
Junio C Hamano75485c82007-05-19 04:20:33571upstream is much larger. A shallow repository
Junio C Hamano35738e82008-01-07 07:55:46572is created by giving the `--depth` option to linkgit:git-clone[1], and
573its history can be later deepened with linkgit:git-fetch[1].
Junio C Hamano4f9a6052007-01-17 20:25:16574
Junio C Hamano967cda72017-06-30 21:49:53575[[def_stash]]stash entry::
576An <<def_object,object>> used to temporarily store the contents of a
577<<def_dirty,dirty>> working directory and the index for future reuse.
578
Junio C Hamano8c5d5942015-06-11 19:37:48579[[def_submodule]]submodule::
580A <<def_repository,repository>> that holds the history of a
581separate project inside another repository (the latter of
582which is called <<def_superproject, superproject>>).
583
584[[def_superproject]]superproject::
585A <<def_repository,repository>> that references repositories
586of other projects in its working tree as <<def_submodule,submodules>>.
587The superproject knows about the names of (but does not hold
588copies of) commit objects of the contained submodules.
589
Junio C Hamano3d5b41f2007-03-26 02:33:41590[[def_symref]]symref::
Junio C Hamanoe3f080d2013-04-22 02:27:13591Symbolic reference: instead of containing the <<def_SHA1,SHA-1>>
Junio C Hamano75485c82007-05-19 04:20:33592id itself, it is of the format 'ref: refs/some/thing' and when
593referenced, it recursively dereferences to this reference.
594'<<def_HEAD,HEAD>>' is a prime example of a symref. Symbolic
Junio C Hamano35738e82008-01-07 07:55:46595references are manipulated with the linkgit:git-symbolic-ref[1]
Junio C Hamano75485c82007-05-19 04:20:33596command.
Junio C Hamano3a971022006-11-18 22:17:58597
Junio C Hamano3d5b41f2007-03-26 02:33:41598[[def_tag]]tag::
Junio C Hamano360e3a12011-07-13 23:51:56599A <<def_ref,ref>> under `refs/tags/` namespace that points to an
600object of an arbitrary type (typically a tag points to either a
601<<def_tag_object,tag>> or a <<def_commit_object,commit object>>).
602In contrast to a <<def_head,head>>, a tag is not updated by
Junio C Hamano076ffcc2013-02-06 05:13:21603the `commit` command. A Git tag has nothing to do with a Lisp
Junio C Hamano360e3a12011-07-13 23:51:56604tag (which would be called an <<def_object_type,object type>>
Junio C Hamano076ffcc2013-02-06 05:13:21605in Git's context). A tag is most typically used to mark a particular
Junio C Hamano360e3a12011-07-13 23:51:56606point in the commit ancestry <<def_chain,chain>>.
Junio C Hamano88a3a072006-05-04 08:01:43607
Junio C Hamano3d5b41f2007-03-26 02:33:41608[[def_tag_object]]tag object::
609An <<def_object,object>> containing a <<def_ref,ref>> pointing to
Junio C Hamano75485c82007-05-19 04:20:33610another object, which can contain a message just like a
Junio C Hamano3d5b41f2007-03-26 02:33:41611<<def_commit_object,commit object>>. It can also contain a (PGP)
Junio C Hamano36460982007-05-27 04:29:12612signature, in which case it is called a "signed tag object".
Junio C Hamano88a3a072006-05-04 08:01:43613
Junio C Hamano3d5b41f2007-03-26 02:33:41614[[def_topic_branch]]topic branch::
Junio C Hamano076ffcc2013-02-06 05:13:21615A regular Git <<def_branch,branch>> that is used by a developer to
Junio C Hamano3d5b41f2007-03-26 02:33:41616identify a conceptual line of development. Since branches are very easy
617and inexpensive, it is often desirable to have several small branches
618that each contain very well defined concepts or small incremental yet
619related changes.
Junio C Hamano88a3a072006-05-04 08:01:43620
Junio C Hamano3d5b41f2007-03-26 02:33:41621[[def_tree]]tree::
622Either a <<def_working_tree,working tree>>, or a <<def_tree_object,tree
Junio C Hamano36460982007-05-27 04:29:12623object>> together with the dependent <<def_blob_object,blob>> and tree objects
Junio C Hamano75485c82007-05-19 04:20:33624(i.e. a stored representation of a working tree).
Junio C Hamano1a4e8412005-12-27 08:17:23625
Junio C Hamano3d5b41f2007-03-26 02:33:41626[[def_tree_object]]tree object::
627An <<def_object,object>> containing a list of file names and modes along
628with refs to the associated blob and/or tree objects. A
629<<def_tree,tree>> is equivalent to a <<def_directory,directory>>.
Junio C Hamano1a4e8412005-12-27 08:17:23630
Junio C Hamanoe6f28d02013-09-17 21:34:00631[[def_tree-ish]]tree-ish (also treeish)::
632A <<def_tree_object,tree object>> or an <<def_object,object>>
633that can be recursively dereferenced to a tree object.
634Dereferencing a <<def_commit_object,commit object>> yields the
635tree object corresponding to the <<def_revision,revision>>'s
636top <<def_directory,directory>>.
637The following are all tree-ishes:
638a <<def_commit-ish,commit-ish>>,
639a tree object,
640a <<def_tag_object,tag object>> that points to a tree object,
641a tag object that points to a tag object that points to a tree
642object,
643etc.
Junio C Hamano1a4e8412005-12-27 08:17:23644
Junio C Hamano3d5b41f2007-03-26 02:33:41645[[def_unmerged_index]]unmerged index::
646An <<def_index,index>> which contains unmerged
647<<def_index_entry,index entries>>.
Junio C Hamano1a4e8412005-12-27 08:17:23648
Junio C Hamano3d5b41f2007-03-26 02:33:41649[[def_unreachable_object]]unreachable object::
650An <<def_object,object>> which is not <<def_reachable,reachable>> from a
651<<def_branch,branch>>, <<def_tag,tag>>, or any other reference.
Junio C Hamanoaa83a7d2007-03-05 02:37:29652
Junio C Hamano98e32c32009-04-13 02:39:53653[[def_upstream_branch]]upstream branch::
654The default <<def_branch,branch>> that is merged into the branch in
655question (or the branch in question is rebased onto). It is configured
656via branch.<name>.remote and branch.<name>.merge. If the upstream branch
657of 'A' is 'origin/B' sometimes we say "'A' is tracking 'origin/B'".
658
Junio C Hamano3d5b41f2007-03-26 02:33:41659[[def_working_tree]]working tree::
Junio C Hamanoc0e55e72009-10-10 00:56:29660The tree of actual checked out files. The working tree normally
661contains the contents of the <<def_HEAD,HEAD>> commit's tree,
662plus any local changes that you have made but not yet committed.