blob: 378306f58162fdfee900b48b8bb6ad8171cbfca3 [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>>
4from another object database, which is called "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
148you have. In such these cases, you do not make a new <<def_merge,merge>>
149<<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 Hamano33db4372006-06-07 19:51:45179
Junio C Hamano3d5b41f2007-03-26 02:33:41180[[def_hash]]hash::
Junio C Hamanoe3f080d2013-04-22 02:27:13181In Git's context, synonym for <<def_object_name,object name>>.
Junio C Hamano88a3a072006-05-04 08:01:43182
Junio C Hamano3d5b41f2007-03-26 02:33:41183[[def_head]]head::
Junio C Hamano36460982007-05-27 04:29:12184A <<def_ref,named reference>> to the <<def_commit,commit>> at the tip of a
Junio C Hamano360e3a12011-07-13 23:51:56185<<def_branch,branch>>. Heads are stored in a file in
186`$GIT_DIR/refs/heads/` directory, except when using packed refs. (See
Junio C Hamano35738e82008-01-07 07:55:46187linkgit:git-pack-refs[1].)
Junio C Hamano75485c82007-05-19 04:20:33188
189[[def_HEAD]]HEAD::
Junio C Hamano36460982007-05-27 04:29:12190The current <<def_branch,branch>>. In more detail: Your <<def_working_tree,
Junio C Hamano75485c82007-05-19 04:20:33191working tree>> is normally derived from the state of the tree
192referred to by HEAD. HEAD is a reference to one of the
193<<def_head,heads>> in your repository, except when using a
Junio C Hamano360e3a12011-07-13 23:51:56194<<def_detached_HEAD,detached HEAD>>, in which case it directly
195references an arbitrary commit.
Junio C Hamano88a3a072006-05-04 08:01:43196
Junio C Hamano3d5b41f2007-03-26 02:33:41197[[def_head_ref]]head ref::
Junio C Hamano75485c82007-05-19 04:20:33198A synonym for <<def_head,head>>.
Junio C Hamano88a3a072006-05-04 08:01:43199
Junio C Hamano3d5b41f2007-03-26 02:33:41200[[def_hook]]hook::
Junio C Hamano076ffcc2013-02-06 05:13:21201During the normal execution of several Git commands, call-outs are made
Junio C Hamano3d5b41f2007-03-26 02:33:41202to optional scripts that allow a developer to add functionality or
203checking. Typically, the hooks allow for a command to be pre-verified
204and potentially aborted, and allow for a post-notification after the
Junio C Hamano75485c82007-05-19 04:20:33205operation is done. The hook scripts are found in the
Junio C Hamano36460982007-05-27 04:29:12206`$GIT_DIR/hooks/` directory, and are enabled by simply
Junio C Hamano116db352008-12-17 19:48:40207removing the `.sample` suffix from the filename. In earlier versions
Junio C Hamano076ffcc2013-02-06 05:13:21208of Git you had to make them executable.
Junio C Hamano88a3a072006-05-04 08:01:43209
Junio C Hamano3d5b41f2007-03-26 02:33:41210[[def_index]]index::
211A collection of files with stat information, whose contents are stored
Junio C Hamano36460982007-05-27 04:29:12212as objects. The index is a stored version of your
213<<def_working_tree,working tree>>. Truth be told, it can also contain a second, and even
214a third version of a working tree, which are used
215when <<def_merge,merging>>.
Junio C Hamano1a4e8412005-12-27 08:17:23216
Junio C Hamano3d5b41f2007-03-26 02:33:41217[[def_index_entry]]index entry::
218The information regarding a particular file, stored in the
Junio C Hamano75485c82007-05-19 04:20:33219<<def_index,index>>. An index entry can be unmerged, if a
220<<def_merge,merge>> was started, but not yet finished (i.e. if
221the index contains multiple versions of that file).
Junio C Hamano1a4e8412005-12-27 08:17:23222
Junio C Hamano3d5b41f2007-03-26 02:33:41223[[def_master]]master::
Junio C Hamano75485c82007-05-19 04:20:33224The default development <<def_branch,branch>>. Whenever you
Junio C Hamano076ffcc2013-02-06 05:13:21225create a Git <<def_repository,repository>>, a branch named
Junio C Hamano75485c82007-05-19 04:20:33226"master" is created, and becomes the active branch. In most
227cases, this contains the local development, though that is
228purely by convention and is not required.
Junio C Hamano1a4e8412005-12-27 08:17:23229
Junio C Hamano3d5b41f2007-03-26 02:33:41230[[def_merge]]merge::
Junio C Hamano75485c82007-05-19 04:20:33231As a verb: To bring the contents of another
232<<def_branch,branch>> (possibly from an external
233<<def_repository,repository>>) into the current branch. In the
234case where the merged-in branch is from a different repository,
235this is done by first <<def_fetch,fetching>> the remote branch
236and then merging the result into the current branch. This
237combination of fetch and merge operations is called a
238<<def_pull,pull>>. Merging is performed by an automatic process
239that identifies changes made since the branches diverged, and
240then applies all those changes together. In cases where changes
241conflict, manual intervention may be required to complete the
242merge.
243+
Junio C Hamano3f680f32009-11-16 02:10:54244As a noun: unless it is a <<def_fast_forward,fast-forward>>, a
Junio C Hamano75485c82007-05-19 04:20:33245successful merge results in the creation of a new <<def_commit,commit>>
246representing the result of the merge, and having as
247<<def_parent,parents>> the tips of the merged <<def_branch,branches>>.
248This commit is referred to as a "merge commit", or sometimes just a
249"merge".
Junio C Hamano1a4e8412005-12-27 08:17:23250
Junio C Hamano3d5b41f2007-03-26 02:33:41251[[def_object]]object::
Junio C Hamano076ffcc2013-02-06 05:13:21252The unit of storage in Git. It is uniquely identified by the
Junio C Hamanoe3f080d2013-04-22 02:27:13253<<def_SHA1,SHA-1>> of its contents. Consequently, an
Junio C Hamano75485c82007-05-19 04:20:33254object can not be changed.
Junio C Hamano1a4e8412005-12-27 08:17:23255
Junio C Hamano3d5b41f2007-03-26 02:33:41256[[def_object_database]]object database::
257Stores a set of "objects", and an individual <<def_object,object>> is
258identified by its <<def_object_name,object name>>. The objects usually
259live in `$GIT_DIR/objects/`.
Junio C Hamano1a4e8412005-12-27 08:17:23260
Junio C Hamano3d5b41f2007-03-26 02:33:41261[[def_object_identifier]]object identifier::
262Synonym for <<def_object_name,object name>>.
Junio C Hamano1a4e8412005-12-27 08:17:23263
Junio C Hamano3d5b41f2007-03-26 02:33:41264[[def_object_name]]object name::
Junio C Hamanoe3f080d2013-04-22 02:27:13265The unique identifier of an <<def_object,object>>. The
266object name is usually represented by a 40 character
267hexadecimal string. Also colloquially called <<def_SHA1,SHA-1>>.
Junio C Hamano1a4e8412005-12-27 08:17:23268
Junio C Hamano3d5b41f2007-03-26 02:33:41269[[def_object_type]]object type::
Junio C Hamano9e1793f2008-06-02 07:31:16270One of the identifiers "<<def_commit_object,commit>>",
271"<<def_tree_object,tree>>", "<<def_tag_object,tag>>" or
272"<<def_blob_object,blob>>" describing the type of an
273<<def_object,object>>.
Junio C Hamano1a4e8412005-12-27 08:17:23274
Junio C Hamano3d5b41f2007-03-26 02:33:41275[[def_octopus]]octopus::
Junio C Hamanoe3f080d2013-04-22 02:27:13276To <<def_merge,merge>> more than two <<def_branch,branches>>.
Junio C Hamano88a3a072006-05-04 08:01:43277
Junio C Hamano3d5b41f2007-03-26 02:33:41278[[def_origin]]origin::
279The default upstream <<def_repository,repository>>. Most projects have
280at least one upstream project which they track. By default
Junio C Hamano75485c82007-05-19 04:20:33281'origin' is used for that purpose. New upstream updates
Junio C Hamano8401f142013-07-12 22:47:46282will be fetched into <<def_remote_tracking_branch,remote-tracking branches>> named
Junio C Hamanod3361ad2007-01-01 03:20:24283origin/name-of-upstream-branch, which you can see using
Junio C Hamanoea82cff2009-03-18 01:54:48284`git branch -r`.
Junio C Hamano88a3a072006-05-04 08:01:43285
Junio C Hamano3d5b41f2007-03-26 02:33:41286[[def_pack]]pack::
287A set of objects which have been compressed into one file (to save space
288or to transmit them efficiently).
Junio C Hamano88a3a072006-05-04 08:01:43289
Junio C Hamano3d5b41f2007-03-26 02:33:41290[[def_pack_index]]pack index::
Junio C Hamano88a3a072006-05-04 08:01:43291The list of identifiers, and other information, of the objects in a
Junio C Hamano3d5b41f2007-03-26 02:33:41292<<def_pack,pack>>, to assist in efficiently accessing the contents of a
Junio C Hamano75485c82007-05-19 04:20:33293pack.
Junio C Hamano1a4e8412005-12-27 08:17:23294
Junio C Hamano63c2bc92011-02-28 06:41:28295[[def_pathspec]]pathspec::
Junio C Hamanoe3f080d2013-04-22 02:27:13296Pattern used to limit paths in Git commands.
Junio C Hamano63c2bc92011-02-28 06:41:28297+
298Pathspecs are used on the command line of "git ls-files", "git
Junio C Hamano2a294cd2011-05-23 23:06:31299ls-tree", "git add", "git grep", "git diff", "git checkout",
300and many other commands to
Junio C Hamano63c2bc92011-02-28 06:41:28301limit the scope of operations to some subset of the tree or
302worktree. See the documentation of each command for whether
303paths are relative to the current directory or toplevel. The
304pathspec syntax is as follows:
Junio C Hamanoe3f080d2013-04-22 02:27:13305+
306--
Junio C Hamano63c2bc92011-02-28 06:41:28307
308* any path matches itself
309* the pathspec up to the last slash represents a
310 directory prefix. The scope of that pathspec is
311 limited to that subtree.
312* the rest of the pathspec is a pattern for the remainder
313 of the pathname. Paths relative to the directory
314 prefix will be matched against that pattern using fnmatch(3);
315 in particular, '*' and '?' _can_ match directory separators.
Junio C Hamanoe3f080d2013-04-22 02:27:13316
317--
Junio C Hamano63c2bc92011-02-28 06:41:28318+
319For example, Documentation/*.jpg will match all .jpg files
320in the Documentation subtree,
321including Documentation/chapter_1/figure_1.jpg.
Junio C Hamano2a294cd2011-05-23 23:06:31322+
323A pathspec that begins with a colon `:` has special meaning. In the
324short form, the leading colon `:` is followed by zero or more "magic
325signature" letters (which optionally is terminated by another colon `:`),
Junio C Hamano21bc18b2014-01-10 20:33:07326and the remainder is the pattern to match against the path.
327The "magic signature" consists of ASCII symbols that are neither
328alphanumeric, glob, regex special charaters nor colon.
329The optional colon that terminates the "magic signature" can be
330omitted if the pattern begins with a character that does not belong to
331"magic signature" symbol set and is not a colon.
Junio C Hamano2a294cd2011-05-23 23:06:31332+
333In the long form, the leading colon `:` is followed by a open
334parenthesis `(`, a comma-separated list of zero or more "magic words",
335and a close parentheses `)`, and the remainder is the pattern to match
336against the path.
337+
Junio C Hamano21bc18b2014-01-10 20:33:07338A pathspec with only a colon means "there is no pathspec". This form
339should not be combined with other pathspec.
Junio C Hamano8eac2682013-09-09 22:35:20340+
341--
Junio C Hamano21bc18b2014-01-10 20:33:07342top;;
343The magic word `top` (magic signature: `/`) makes the pattern
344match from the root of the working tree, even when you are
345running the command from inside a subdirectory.
Junio C Hamano8eac2682013-09-09 22:35:20346
347literal;;
348Wildcards in the pattern such as `*` or `?` are treated
349as literal characters.
350
351icase;;
352Case insensitive match.
353
354glob;;
355Git treats the pattern as a shell glob suitable for
356consumption by fnmatch(3) with the FNM_PATHNAME flag:
357wildcards in the pattern will not match a / in the pathname.
358For example, "Documentation/{asterisk}.html" matches
359"Documentation/git.html" but not "Documentation/ppc/ppc.html"
360or "tools/perf/Documentation/perf.html".
361+
362Two consecutive asterisks ("`**`") in patterns matched against
363full pathname may have special meaning:
364
365 - A leading "`**`" followed by a slash means match in all
366 directories. For example, "`**/foo`" matches file or directory
Junio C Hamanob73af6c2013-12-03 22:07:11367 "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`"
Junio C Hamano8eac2682013-09-09 22:35:20368 matches file or directory "`bar`" anywhere that is directly
369 under directory "`foo`".
370
Junio C Hamanob73af6c2013-12-03 22:07:11371 - A trailing "`/**`" matches everything inside. For example,
372 "`abc/**`" matches all files inside directory "abc", relative
Junio C Hamano8eac2682013-09-09 22:35:20373 to the location of the `.gitignore` file, with infinite depth.
374
375 - A slash followed by two consecutive asterisks then a slash
376 matches zero or more directories. For example, "`a/**/b`"
377 matches "`a/b`", "`a/x/b`", "`a/x/y/b`" and so on.
378
379 - Other consecutive asterisks are considered invalid.
380+
381Glob magic is incompatible with literal magic.
Junio C Hamano21bc18b2014-01-10 20:33:07382
383exclude;;
384After a path matches any non-exclude pathspec, it will be run
385through all exclude pathspec (magic signature: `!`). If it
386matches, the path is ignored.
Junio C Hamano8eac2682013-09-09 22:35:20387--
Junio C Hamano2a294cd2011-05-23 23:06:31388
Junio C Hamano3d5b41f2007-03-26 02:33:41389[[def_parent]]parent::
390A <<def_commit_object,commit object>> contains a (possibly empty) list
391of the logical predecessor(s) in the line of development, i.e. its
392parents.
Junio C Hamano1a4e8412005-12-27 08:17:23393
Junio C Hamano3d5b41f2007-03-26 02:33:41394[[def_pickaxe]]pickaxe::
395The term <<def_pickaxe,pickaxe>> refers to an option to the diffcore
396routines that help select changes that add or delete a given text
Junio C Hamano764a6672007-10-23 01:23:31397string. With the `--pickaxe-all` option, it can be used to view the full
Junio C Hamano3d5b41f2007-03-26 02:33:41398<<def_changeset,changeset>> that introduced or removed, say, a
Junio C Hamano35738e82008-01-07 07:55:46399particular line of text. See linkgit:git-diff[1].
Junio C Hamano1a4e8412005-12-27 08:17:23400
Junio C Hamano3d5b41f2007-03-26 02:33:41401[[def_plumbing]]plumbing::
Junio C Hamano076ffcc2013-02-06 05:13:21402Cute name for <<def_core_git,core Git>>.
Junio C Hamano1a4e8412005-12-27 08:17:23403
Junio C Hamano3d5b41f2007-03-26 02:33:41404[[def_porcelain]]porcelain::
405Cute name for programs and program suites depending on
Junio C Hamano076ffcc2013-02-06 05:13:21406<<def_core_git,core Git>>, presenting a high level access to
407core Git. Porcelains expose more of a <<def_SCM,SCM>>
Junio C Hamano3d5b41f2007-03-26 02:33:41408interface than the <<def_plumbing,plumbing>>.
Junio C Hamano1a4e8412005-12-27 08:17:23409
Junio C Hamano3d5b41f2007-03-26 02:33:41410[[def_pull]]pull::
411Pulling a <<def_branch,branch>> means to <<def_fetch,fetch>> it and
Junio C Hamano35738e82008-01-07 07:55:46412<<def_merge,merge>> it. See also linkgit:git-pull[1].
Junio C Hamano1a4e8412005-12-27 08:17:23413
Junio C Hamano3d5b41f2007-03-26 02:33:41414[[def_push]]push::
Junio C Hamano75485c82007-05-19 04:20:33415Pushing a <<def_branch,branch>> means to get the branch's
Junio C Hamano3d5b41f2007-03-26 02:33:41416<<def_head_ref,head ref>> from a remote <<def_repository,repository>>,
Junio C Hamano764a6672007-10-23 01:23:31417find out if it is a direct ancestor to the branch's local
418head ref, and in that case, putting all
Junio C Hamano3d5b41f2007-03-26 02:33:41419objects, which are <<def_reachable,reachable>> from the local
Junio C Hamano75485c82007-05-19 04:20:33420head ref, and which are missing from the remote
421repository, into the remote
Junio C Hamano3d5b41f2007-03-26 02:33:41422<<def_object_database,object database>>, and updating the remote
Junio C Hamano75485c82007-05-19 04:20:33423head ref. If the remote <<def_head,head>> is not an
424ancestor to the local head, the push fails.
Junio C Hamano1a4e8412005-12-27 08:17:23425
Junio C Hamano3d5b41f2007-03-26 02:33:41426[[def_reachable]]reachable::
427All of the ancestors of a given <<def_commit,commit>> are said to be
Junio C Hamano75485c82007-05-19 04:20:33428"reachable" from that commit. More
429generally, one <<def_object,object>> is reachable from
Junio C Hamano3d5b41f2007-03-26 02:33:41430another if we can reach the one from the other by a <<def_chain,chain>>
431that follows <<def_tag,tags>> to whatever they tag,
432<<def_commit_object,commits>> to their parents or trees, and
433<<def_tree_object,trees>> to the trees or <<def_blob_object,blobs>>
434that they contain.
Junio C Hamanof3e80c02006-01-11 00:54:55435
Junio C Hamano3d5b41f2007-03-26 02:33:41436[[def_rebase]]rebase::
437To reapply a series of changes from a <<def_branch,branch>> to a
438different base, and reset the <<def_head,head>> of that branch
439to the result.
Junio C Hamanof3e80c02006-01-11 00:54:55440
Junio C Hamano3d5b41f2007-03-26 02:33:41441[[def_ref]]ref::
Junio C Hamanoe6f28d02013-09-17 21:34:00442A name that begins with `refs/` (e.g. `refs/heads/master`)
443that points to an <<def_object_name,object name>> or another
444ref (the latter is called a <<def_symref,symbolic ref>>).
445For convenience, a ref can sometimes be abbreviated when used
446as an argument to a Git command; see linkgit:gitrevisions[7]
447for details.
448Refs are stored in the <<def_repository,repository>>.
449+
450The ref namespace is hierarchical.
451Different subhierarchies are used for different purposes (e.g. the
452`refs/heads/` hierarchy is used to represent local branches).
453+
454There are a few special-purpose refs that do not begin with `refs/`.
455The most notable example is `HEAD`.
Junio C Hamano1a4e8412005-12-27 08:17:23456
Junio C Hamanobb0f4042007-07-04 06:41:40457[[def_reflog]]reflog::
458A reflog shows the local "history" of a ref. In other words,
459it can tell you what the 3rd last revision in _this_ repository
460was, and what was the current state in _this_ repository,
Junio C Hamano35738e82008-01-07 07:55:46461yesterday 9:14pm. See linkgit:git-reflog[1] for details.
Junio C Hamanobb0f4042007-07-04 06:41:40462
Junio C Hamano3d5b41f2007-03-26 02:33:41463[[def_refspec]]refspec::
Junio C Hamano36460982007-05-27 04:29:12464A "refspec" is used by <<def_fetch,fetch>> and
Junio C Hamano75485c82007-05-19 04:20:33465<<def_push,push>> to describe the mapping between remote
Junio C Hamanoe3f080d2013-04-22 02:27:13466<<def_ref,ref>> and local ref.
Junio C Hamano88a3a072006-05-04 08:01:43467
Junio C Hamano97bcb482010-11-25 03:16:07468[[def_remote_tracking_branch]]remote-tracking branch::
Junio C Hamanoc7102962013-05-29 23:57:17469A <<def_ref,ref>> that is used to follow changes from another
470<<def_repository,repository>>. It typically looks like
471'refs/remotes/foo/bar' (indicating that it tracks a branch named
472'bar' in a remote named 'foo'), and matches the right-hand-side of
473a configured fetch <<def_refspec,refspec>>. A remote-tracking
474branch should not contain direct modifications or have local
475commits made to it.
Junio C Hamano97bcb482010-11-25 03:16:07476
Junio C Hamano3d5b41f2007-03-26 02:33:41477[[def_repository]]repository::
Junio C Hamano36460982007-05-27 04:29:12478A collection of <<def_ref,refs>> together with an
Junio C Hamano75485c82007-05-19 04:20:33479<<def_object_database,object database>> containing all objects
480which are <<def_reachable,reachable>> from the refs, possibly
Junio C Hamano36460982007-05-27 04:29:12481accompanied by meta data from one or more <<def_porcelain,porcelains>>. A
482repository can share an object database with other repositories
483via <<def_alternate_object_database,alternates mechanism>>.
Junio C Hamano88a3a072006-05-04 08:01:43484
Junio C Hamano3d5b41f2007-03-26 02:33:41485[[def_resolve]]resolve::
486The action of fixing up manually what a failed automatic
487<<def_merge,merge>> left behind.
Junio C Hamano88a3a072006-05-04 08:01:43488
Junio C Hamano3d5b41f2007-03-26 02:33:41489[[def_revision]]revision::
Junio C Hamanof26c77e2013-04-27 00:06:04490Synonym for <<def_commit,commit>> (the noun).
Junio C Hamano88a3a072006-05-04 08:01:43491
Junio C Hamano3d5b41f2007-03-26 02:33:41492[[def_rewind]]rewind::
493To throw away part of the development, i.e. to assign the
494<<def_head,head>> to an earlier <<def_revision,revision>>.
Junio C Hamano88a3a072006-05-04 08:01:43495
Junio C Hamano3d5b41f2007-03-26 02:33:41496[[def_SCM]]SCM::
Junio C Hamano88a3a072006-05-04 08:01:43497Source code management (tool).
498
Junio C Hamanoe3f080d2013-04-22 02:27:13499[[def_SHA1]]SHA-1::
500"Secure Hash Algorithm 1"; a cryptographic hash function.
501In the context of Git used as a synonym for <<def_object_name,object name>>.
Junio C Hamano88a3a072006-05-04 08:01:43502
Junio C Hamano3d5b41f2007-03-26 02:33:41503[[def_shallow_repository]]shallow repository::
Junio C Hamano36460982007-05-27 04:29:12504A shallow <<def_repository,repository>> has an incomplete
505history some of whose <<def_commit,commits>> have <<def_parent,parents>> cauterized away (in other
Junio C Hamano076ffcc2013-02-06 05:13:21506words, Git is told to pretend that these commits do not have the
Junio C Hamano3d5b41f2007-03-26 02:33:41507parents, even though they are recorded in the <<def_commit_object,commit
508object>>). This is sometimes useful when you are interested only in the
509recent history of a project even though the real history recorded in the
Junio C Hamano75485c82007-05-19 04:20:33510upstream is much larger. A shallow repository
Junio C Hamano35738e82008-01-07 07:55:46511is created by giving the `--depth` option to linkgit:git-clone[1], and
512its history can be later deepened with linkgit:git-fetch[1].
Junio C Hamano4f9a6052007-01-17 20:25:16513
Junio C Hamano3d5b41f2007-03-26 02:33:41514[[def_symref]]symref::
Junio C Hamanoe3f080d2013-04-22 02:27:13515Symbolic reference: instead of containing the <<def_SHA1,SHA-1>>
Junio C Hamano75485c82007-05-19 04:20:33516id itself, it is of the format 'ref: refs/some/thing' and when
517referenced, it recursively dereferences to this reference.
518'<<def_HEAD,HEAD>>' is a prime example of a symref. Symbolic
Junio C Hamano35738e82008-01-07 07:55:46519references are manipulated with the linkgit:git-symbolic-ref[1]
Junio C Hamano75485c82007-05-19 04:20:33520command.
Junio C Hamano3a971022006-11-18 22:17:58521
Junio C Hamano3d5b41f2007-03-26 02:33:41522[[def_tag]]tag::
Junio C Hamano360e3a12011-07-13 23:51:56523A <<def_ref,ref>> under `refs/tags/` namespace that points to an
524object of an arbitrary type (typically a tag points to either a
525<<def_tag_object,tag>> or a <<def_commit_object,commit object>>).
526In contrast to a <<def_head,head>>, a tag is not updated by
Junio C Hamano076ffcc2013-02-06 05:13:21527the `commit` command. A Git tag has nothing to do with a Lisp
Junio C Hamano360e3a12011-07-13 23:51:56528tag (which would be called an <<def_object_type,object type>>
Junio C Hamano076ffcc2013-02-06 05:13:21529in Git's context). A tag is most typically used to mark a particular
Junio C Hamano360e3a12011-07-13 23:51:56530point in the commit ancestry <<def_chain,chain>>.
Junio C Hamano88a3a072006-05-04 08:01:43531
Junio C Hamano3d5b41f2007-03-26 02:33:41532[[def_tag_object]]tag object::
533An <<def_object,object>> containing a <<def_ref,ref>> pointing to
Junio C Hamano75485c82007-05-19 04:20:33534another object, which can contain a message just like a
Junio C Hamano3d5b41f2007-03-26 02:33:41535<<def_commit_object,commit object>>. It can also contain a (PGP)
Junio C Hamano36460982007-05-27 04:29:12536signature, in which case it is called a "signed tag object".
Junio C Hamano88a3a072006-05-04 08:01:43537
Junio C Hamano3d5b41f2007-03-26 02:33:41538[[def_topic_branch]]topic branch::
Junio C Hamano076ffcc2013-02-06 05:13:21539A regular Git <<def_branch,branch>> that is used by a developer to
Junio C Hamano3d5b41f2007-03-26 02:33:41540identify a conceptual line of development. Since branches are very easy
541and inexpensive, it is often desirable to have several small branches
542that each contain very well defined concepts or small incremental yet
543related changes.
Junio C Hamano88a3a072006-05-04 08:01:43544
Junio C Hamano3d5b41f2007-03-26 02:33:41545[[def_tree]]tree::
546Either a <<def_working_tree,working tree>>, or a <<def_tree_object,tree
Junio C Hamano36460982007-05-27 04:29:12547object>> together with the dependent <<def_blob_object,blob>> and tree objects
Junio C Hamano75485c82007-05-19 04:20:33548(i.e. a stored representation of a working tree).
Junio C Hamano1a4e8412005-12-27 08:17:23549
Junio C Hamano3d5b41f2007-03-26 02:33:41550[[def_tree_object]]tree object::
551An <<def_object,object>> containing a list of file names and modes along
552with refs to the associated blob and/or tree objects. A
553<<def_tree,tree>> is equivalent to a <<def_directory,directory>>.
Junio C Hamano1a4e8412005-12-27 08:17:23554
Junio C Hamanoe6f28d02013-09-17 21:34:00555[[def_tree-ish]]tree-ish (also treeish)::
556A <<def_tree_object,tree object>> or an <<def_object,object>>
557that can be recursively dereferenced to a tree object.
558Dereferencing a <<def_commit_object,commit object>> yields the
559tree object corresponding to the <<def_revision,revision>>'s
560top <<def_directory,directory>>.
561The following are all tree-ishes:
562a <<def_commit-ish,commit-ish>>,
563a tree object,
564a <<def_tag_object,tag object>> that points to a tree object,
565a tag object that points to a tag object that points to a tree
566object,
567etc.
Junio C Hamano1a4e8412005-12-27 08:17:23568
Junio C Hamano3d5b41f2007-03-26 02:33:41569[[def_unmerged_index]]unmerged index::
570An <<def_index,index>> which contains unmerged
571<<def_index_entry,index entries>>.
Junio C Hamano1a4e8412005-12-27 08:17:23572
Junio C Hamano3d5b41f2007-03-26 02:33:41573[[def_unreachable_object]]unreachable object::
574An <<def_object,object>> which is not <<def_reachable,reachable>> from a
575<<def_branch,branch>>, <<def_tag,tag>>, or any other reference.
Junio C Hamanoaa83a7d2007-03-05 02:37:29576
Junio C Hamano98e32c32009-04-13 02:39:53577[[def_upstream_branch]]upstream branch::
578The default <<def_branch,branch>> that is merged into the branch in
579question (or the branch in question is rebased onto). It is configured
580via branch.<name>.remote and branch.<name>.merge. If the upstream branch
581of 'A' is 'origin/B' sometimes we say "'A' is tracking 'origin/B'".
582
Junio C Hamano3d5b41f2007-03-26 02:33:41583[[def_working_tree]]working tree::
Junio C Hamanoc0e55e72009-10-10 00:56:29584The tree of actual checked out files. The working tree normally
585contains the contents of the <<def_HEAD,HEAD>> commit's tree,
586plus any local changes that you have made but not yet committed.