summaryrefslogtreecommitdiffstats
path: root/git-branch.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-10 13:34:48 -0800
committerJunio C Hamano <gitster@pobox.com>2022-01-10 13:34:48 -0800
commit9d060b84d900083fb1b577b976fa963a715efc71 (patch)
tree4b6f08c7e7a395bfb536312ffe41658cecb6d4a9 /git-branch.html
parente872a1cfb365aa9016e685705d691f75c4585220 (diff)
downloadgit-htmldocs-9d060b84d900083fb1b577b976fa963a715efc71.tar.gz
Autogenerated HTML docs for v2.35.0-rc0
Diffstat (limited to 'git-branch.html')
-rw-r--r--git-branch.html24
1 files changed, 16 insertions, 8 deletions
diff --git a/git-branch.html b/git-branch.html
index a8d8ed4a1..cca3ef6da 100644
--- a/git-branch.html
+++ b/git-branch.html
@@ -757,7 +757,7 @@ git-branch(1) Manual Page
[--points-at &lt;object&gt;] [--format=&lt;format&gt;]
[(-r | --remotes) | (-a | --all)]
[--list] [&lt;pattern&gt;&#8230;]
-<em>git branch</em> [--track | --no-track] [-f] &lt;branchname&gt; [&lt;start-point&gt;]
+<em>git branch</em> [--track [direct|inherit] | --no-track] [-f] &lt;branchname&gt; [&lt;start-point&gt;]
<em>git branch</em> (--set-upstream-to=&lt;upstream&gt; | -u &lt;upstream&gt;) [&lt;branchname&gt;]
<em>git branch</em> --unset-upstream [&lt;branchname&gt;]
<em>git branch</em> (-m | -M) [&lt;oldbranch&gt;] &lt;newbranch&gt;
@@ -1068,23 +1068,31 @@ way to clean up all obsolete remote-tracking branches.</p></div>
-t
</dt>
<dt class="hdlist1">
---track
+--track [inherit|direct]
</dt>
<dd>
<p>
When creating a new branch, set up <code>branch.&lt;name&gt;.remote</code> and
- <code>branch.&lt;name&gt;.merge</code> configuration entries to mark the
- start-point branch as "upstream" from the new branch. This
+ <code>branch.&lt;name&gt;.merge</code> configuration entries to set "upstream" tracking
+ configuration for the new branch. This
configuration will tell git to show the relationship between the
two branches in <code>git status</code> and <code>git branch -v</code>. Furthermore,
it directs <code>git pull</code> without arguments to pull from the
upstream when the new branch is checked out.
</p>
-<div class="paragraph"><p>This behavior is the default when the start point is a remote-tracking branch.
+<div class="paragraph"><p>The exact upstream branch is chosen depending on the optional argument:
+<code>--track</code> or <code>--track direct</code> means to use the start-point branch itself as the
+upstream; <code>--track inherit</code> means to copy the upstream configuration of the
+start-point branch.</p></div>
+<div class="paragraph"><p><code>--track direct</code> is the default when the start point is a remote-tracking branch.
Set the branch.autoSetupMerge configuration variable to <code>false</code> if you
want <code>git switch</code>, <code>git checkout</code> and <code>git branch</code> to always behave as if <code>--no-track</code>
were given. Set it to <code>always</code> if you want this behavior when the
-start-point is either a local or remote-tracking branch.</p></div>
+start-point is either a local or remote-tracking branch. Set it to
+<code>inherit</code> if you want to copy the tracking configuration from the
+branch point.</p></div>
+<div class="paragraph"><p>See <a href="git-pull.html">git-pull(1)</a> and <a href="git-config.html">git-config(1)</a> for additional discussion on
+how the <code>branch.&lt;name&gt;.remote</code> and <code>branch.&lt;name&gt;.merge</code> options are used.</p></div>
</dd>
<dt class="hdlist1">
--no-track
@@ -1092,7 +1100,7 @@ start-point is either a local or remote-tracking branch.</p></div>
<dd>
<p>
Do not set up "upstream" configuration, even if the
- branch.autoSetupMerge configuration variable is true.
+ branch.autoSetupMerge configuration variable is set.
</p>
</dd>
<dt class="hdlist1">
@@ -1398,7 +1406,7 @@ a branch?&#8221;</a> in the Git User&#8217;s Manual.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2021-10-29 16:18:45 PDT
+ 2022-01-10 13:33:11 PST
</div>
</div>
</body>