* "git branch" (and "git checkout -b") to branch from a local branch can
optionally set "branch.<name>.merge" to mark the new branch to build on
the other local branch, when "branch.autosetupmerge" is set to
- "always". By default, this does not happen when branching from a local
- branch.
+ "always", or when passing the command line option "--track" (this option
+ was ignored when branching from local branches). By default, this does
+ not happen when branching from a local branch.
* "git checkout" to switch to a branch that has "branch.<name>.merge" set
(i.e. marked to build on another branch) reports how much the branch
Move objects and refs by archive.
linkgit:git-checkout[1]::
- Checkout and switch to a branch.
+ Checkout a branch or paths to the working tree.
linkgit:git-cherry-pick[1]::
Apply the change introduced by an existing commit.
<h2>NAME</h2>\r
<div class="sectionbody">\r
<p>git-checkout -\r
- Checkout and switch to a branch\r
+ Checkout a branch or paths to the working tree\r
</p>\r
</div>\r
</div>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 28-Feb-2008 00:25:37 UTC\r
+Last updated 25-Mar-2008 09:10:21 UTC\r
</div>\r
</div>\r
</body>\r
NAME
----
-git-checkout - Checkout and switch to a branch
+git-checkout - Checkout a branch or paths to the working tree
SYNOPSIS
--------
creates a <em>tag</em> object, and requires the tag message. Unless\r
<tt>-m <msg></tt> or <tt>-F <file></tt> is given, an editor is started for the user to type\r
in the tag message.</p>\r
+<p>If <tt>-m <msg></tt> or <tt>-F <file></tt> is given and <tt>-a</tt>, <tt>-s</tt>, and <tt>-u <key-id></tt>\r
+are absent, <tt>-a</tt> is implied.</p>\r
<p>Otherwise just the SHA1 object name of the commit object is\r
written (i.e. a lightweight tag).</p>\r
<p>A GnuPG signed tag object will be created when <tt>-s</tt> or <tt>-u\r
Use the given tag message (instead of prompting).\r
If multiple <tt>-m</tt> options are given, there values are\r
concatenated as separate paragraphs.\r
+ Implies <tt>-a</tt> if none of <tt>-a</tt>, <tt>-s</tt>, or <tt>-u <key-id></tt>\r
+ is given.\r
</p>\r
</dd>\r
<dt>\r
<p>\r
Take the tag message from the given file. Use <em>-</em> to\r
read the message from the standard input.\r
+ Implies <tt>-a</tt> if none of <tt>-a</tt>, <tt>-s</tt>, or <tt>-u <key-id></tt>\r
+ is given.\r
</p>\r
</dd>\r
</dl>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 07-Jan-2008 07:50:53 UTC\r
+Last updated 25-Mar-2008 09:10:21 UTC\r
</div>\r
</div>\r
</body>\r
`-m <msg>` or `-F <file>` is given, an editor is started for the user to type
in the tag message.
+If `-m <msg>` or `-F <file>` is given and `-a`, `-s`, and `-u <key-id>`
+are absent, `-a` is implied.
+
Otherwise just the SHA1 object name of the commit object is
written (i.e. a lightweight tag).
Use the given tag message (instead of prompting).
If multiple `-m` options are given, there values are
concatenated as separate paragraphs.
+ Implies `-a` if none of `-a`, `-s`, or `-u <key-id>`
+ is given.
-F <file>::
Take the tag message from the given file. Use '-' to
read the message from the standard input.
+ Implies `-a` if none of `-a`, `-s`, or `-u <key-id>`
+ is given.
CONFIGURATION
-------------
</dt>\r
<dd>\r
<p>\r
- Checkout and switch to a branch.\r
+ Checkout a branch or paths to the working tree.\r
</p>\r
</dd>\r
<dt>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 09-Mar-2008 10:38:34 UTC\r
+Last updated 25-Mar-2008 09:10:22 UTC\r
</div>\r
</div>\r
</body>\r
</dt>\r
<dd>\r
<p>\r
- The action of updating the <a href="#def_working_tree">working tree</a> to a\r
- <a href="#def_revision">revision</a> which was stored in the\r
- <a href="#def_object_database">object database</a>.\r
+ The action of updating all or part of the\r
+ <a href="#def_working_tree">working tree</a> with a <a href="#def_tree_object">tree object</a>\r
+ or <a href="#def_blob_object">blob</a> from the\r
+ <a href="#def_object_database">object database</a>, and updating the\r
+ <a href="#def_index">index</a> and <a href="#def_HEAD">HEAD</a> if the whole working tree has\r
+ been pointed at a new <a href="#def_branch">branch</a>.\r
</p>\r
</dd>\r
<dt>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 07-Jan-2008 07:51:14 UTC\r
+Last updated 25-Mar-2008 09:10:23 UTC\r
</div>\r
</div>\r
</body>\r
"changesets" with git.
[[def_checkout]]checkout::
- The action of updating the <<def_working_tree,working tree>> to a
- <<def_revision,revision>> which was stored in the
- <<def_object_database,object database>>.
+ The action of updating all or part of the
+ <<def_working_tree,working tree>> with a <<def_tree_object,tree object>>
+ or <<def_blob_object,blob>> from the
+ <<def_object_database,object database>>, and updating the
+ <<def_index,index>> and <<def_HEAD,HEAD>> if the whole working tree has
+ been pointed at a new <<def_branch,branch>>.
[[def_cherry-picking]]cherry-picking::
In <<def_SCM,SCM>> jargon, "cherry pick" means to choose a subset of
<code class="literal">prepare_revision_walk()</code> for initialization, and then you can get the
commits one by one with the function <code class="literal">get_revision()</code>.</p><p>If you are interested in more details of the revision walking process,
just have a look at the first implementation of <code class="literal">cmd_log()</code>; call
-<code class="literal">git-show v1.3.0<sub>155^2</sub>4</code> and scroll down to that function (note that you
+<code class="literal">git-show v1.3.0~155^2~4</code> and scroll down to that function (note that you
no longer need to call <code class="literal">setup_pager()</code> directly).</p><p>Nowadays, <code class="literal">git log</code> is a builtin, which means that it is _contained_ in the
command <code class="literal">git</code>. The source side of a builtin is</p><div class="itemizedlist"><ul type="disc"><li>
a function called <code class="literal">cmd_<bla></code>, typically defined in <code class="literal">builtin-<bla>.c</code>,
</dd><dt><span class="term">
<a name="def_checkout"></a>checkout
</span></dt><dd>
- The action of updating the <a href="#def_working_tree">working tree</a> to a
- <a href="#def_revision">revision</a> which was stored in the
- <a href="#def_object_database">object database</a>.
+ The action of updating all or part of the
+ <a href="#def_working_tree">working tree</a> with a <a href="#def_tree_object">tree object</a>
+ or <a href="#def_blob_object">blob</a> from the
+ <a href="#def_object_database">object database</a>, and updating the
+ <a href="#def_index">index</a> and <a href="#def_HEAD">HEAD</a> if the whole working tree has
+ been pointed at a new <a href="#def_branch">branch</a>.
</dd><dt><span class="term">
<a name="def_cherry-picking"></a>cherry-picking
</span></dt><dd>
If you are interested in more details of the revision walking process,
just have a look at the first implementation of `cmd_log()`; call
-`git-show v1.3.0~155^2~4` and scroll down to that function (note that you
+`git-show v1.3.0{tilde}155^2{tilde}4` and scroll down to that function (note that you
no longer need to call `setup_pager()` directly).
Nowadays, `git log` is a builtin, which means that it is _contained_ in the