diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-06-23 13:26:29 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-23 13:26:29 -0700 |
commit | 9469c13db24e0edec73595887cf74f38efd89a55 (patch) | |
tree | 269e9e6ab7f3dc3a8481c537a8e49f018f6361c2 /git-worktree.html | |
parent | a7b2c10835189668841231edffc77e7dbb020487 (diff) | |
download | git-htmldocs-9469c13db24e0edec73595887cf74f38efd89a55.tar.gz |
Autogenerated HTML docs for v2.41.0-191-g6ff334
Diffstat (limited to 'git-worktree.html')
-rw-r--r-- | git-worktree.html | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/git-worktree.html b/git-worktree.html index 665388379..8f05cc8b6 100644 --- a/git-worktree.html +++ b/git-worktree.html @@ -750,7 +750,7 @@ git-worktree(1) Manual Page <div class="sectionbody">
<div class="verseblock">
<pre class="content"><em>git worktree add</em> [-f] [--detach] [--checkout] [--lock [--reason <string>]]
- [-b <new-branch>] <path> [<commit-ish>]
+ [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>]
<em>git worktree list</em> [-v | --porcelain [-z]]
<em>git worktree lock</em> [--reason <string>] <worktree>
<em>git worktree move</em> <worktree> <new-path>
@@ -837,6 +837,15 @@ exist, a new branch based on <code>HEAD</code> is automatically created as if <code>-b <branch></code> was given. If <code><branch></code> does exist, it will be checked out
in the new worktree, if it’s not checked out anywhere else, otherwise the
command will refuse to create the worktree (unless <code>--force</code> is used).</p></div>
+<div class="paragraph"><p>If <code><commit-ish></code> is omitted, neither <code>--detach</code>, or <code>--orphan</code> is
+used, and there are no valid local branches (or remote branches if
+<code>--guess-remote</code> is specified) then, as a convenience, the new worktree is
+associated with a new orphan branch named <code><branch></code> (after
+<code>$(basename <path>)</code> if neither <code>-b</code> or <code>-B</code> is used) as if <code>--orphan</code> was
+passed to the command. In the event the repository has a remote and
+<code>--guess-remote</code> is used, but no remote or local branches exist, then the
+command fails with a warning reminding the user to fetch from their remote
+first (or override by using <code>-f/--force</code>).</p></div>
</dd>
<dt class="hdlist1">
list
@@ -1039,6 +1048,15 @@ To remove a locked worktree, specify <code>--force</code> twice.</p></div> </p>
</dd>
<dt class="hdlist1">
+--orphan
+</dt>
+<dd>
+<p>
+ With <code>add</code>, make the new worktree and index empty, associating
+ the worktree with a new orphan/unborn branch named <code><new-branch></code>.
+</p>
+</dd>
+<dt class="hdlist1">
--porcelain
</dt>
<dd>
@@ -1380,7 +1398,7 @@ checkouts of a superproject.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2022-10-28 11:53:56 PDT
+ 2023-06-23 13:24:09 PDT
</div>
</div>
</body>
|