<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-worktree.txt, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-05-23T05:38:18Z</updated>
<entry>
<title>Merge branch 'tg/worktree-add-existing-branch'</title>
<updated>2018-05-23T05:38:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=10174da9f1643eb939d93d479547494baf77377b'/>
<id>urn:sha1:10174da9f1643eb939d93d479547494baf77377b</id>
<content type='text'>
"git worktree add" learned to check out an existing branch.

* tg/worktree-add-existing-branch:
  worktree: teach "add" to check out existing branches
  worktree: factor out dwim_branch function
  worktree: improve message when creating a new worktree
  worktree: remove extra members from struct add_opts
</content>
</entry>
<entry>
<title>Merge branch 'sb/worktree-remove-opt-force'</title>
<updated>2018-05-08T06:59:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-08T06:59:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=90186fa0579e4dcdde08a2d823d9b269578d5a70'/>
<id>urn:sha1:90186fa0579e4dcdde08a2d823d9b269578d5a70</id>
<content type='text'>
"git worktree remove" learned that "-f" is a shorthand for
"--force" option, just like for "git worktree add".

* sb/worktree-remove-opt-force:
  worktree: accept -f as short for --force for removal
</content>
</entry>
<entry>
<title>worktree: teach "add" to check out existing branches</title>
<updated>2018-04-30T00:06:34Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2018-04-24T21:56:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f60a7b763fe070161b332d3878f81a7f09ab6e44'/>
<id>urn:sha1:f60a7b763fe070161b332d3878f81a7f09ab6e44</id>
<content type='text'>
Currently 'git worktree add &lt;path&gt;' creates a new branch named after the
basename of the path by default.  If a branch with that name already
exists, the command refuses to do anything, unless the '--force' option
is given.

However we can do a little better than that, and check the branch out if
it is not checked out anywhere else.  This will help users who just want
to check an existing branch out into a new worktree, and save a few
keystrokes.

As the current behaviour is to simply 'die()' when a branch with the name
of the basename of the path already exists, there are no backwards
compatibility worries here.

We will still 'die()' if the branch is checked out in another worktree,
unless the --force flag is passed.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Reviewed-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'es/worktree-docs'</title>
<updated>2018-04-25T04:29:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-04-25T04:29:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b747fc72399c2fed6922375fe0a290f98649acf'/>
<id>urn:sha1:6b747fc72399c2fed6922375fe0a290f98649acf</id>
<content type='text'>
Doc updates.

* es/worktree-docs:
  git-worktree.txt: unify command-line prompt in example blocks
  git-worktree.txt: recommend 'git worktree remove' over manual deletion
</content>
</entry>
<entry>
<title>worktree: accept -f as short for --force for removal</title>
<updated>2018-04-18T00:19:05Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-04-17T18:19:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d228eea5146540b09376f90e2b805553cdc78590'/>
<id>urn:sha1:d228eea5146540b09376f90e2b805553cdc78590</id>
<content type='text'>
Many commands support a "--force" option, frequently abbreviated as
"-f", however, "git worktree remove"'s hand-rolled OPT_BOOL forgets
to recognize the short form, despite git-worktree.txt documenting
"-f" as supported. Replace OPT_BOOL with OPT__FORCE, which provides
"-f" for free, and makes 'remove' consistent with 'add' option
parsing (which also specifies the PARSE_OPT_NOCOMPLETE flag).

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-worktree.txt: unify command-line prompt in example blocks</title>
<updated>2018-04-09T09:49:24Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-04-09T07:34:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22d11a6e8e2d0aa6f5930477c3509483dbe4545a'/>
<id>urn:sha1:22d11a6e8e2d0aa6f5930477c3509483dbe4545a</id>
<content type='text'>
The command-line prompt in the "EXAMPLES" section is "$", however,
examples in the 'git worktree list' section (oddly) use "S" as a
prompt. Fix this inconsistency by settling on "$" as prompt in all
examples.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-worktree.txt: recommend 'git worktree remove' over manual deletion</title>
<updated>2018-04-09T09:49:22Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-04-09T07:33:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3f0b42bd074fcb49ae9b18522e6b2b8a27aa07b6'/>
<id>urn:sha1:3f0b42bd074fcb49ae9b18522e6b2b8a27aa07b6</id>
<content type='text'>
When cc73385cf6 (worktree remove: new command, 2018-02-12) implemented
and documented 'git worktree remove', it forgot to update existing
instructions suggesting manual deletion. Fix this oversight by
recommending 'git worktree remove' instead.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/worktree-move'</title>
<updated>2018-03-14T19:01:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-14T19:01:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd0f794342d5b3921f2d5d4bffce87ec7b7e4d96'/>
<id>urn:sha1:bd0f794342d5b3921f2d5d4bffce87ec7b7e4d96</id>
<content type='text'>
"git worktree" learned move and remove subcommands.

* nd/worktree-move:
  t2028: fix minor error and issues in newly-added "worktree move" tests
  worktree remove: allow it when $GIT_WORK_TREE is already gone
  worktree remove: new command
  worktree move: refuse to move worktrees with submodules
  worktree move: accept destination as directory
  worktree move: new command
  worktree.c: add update_worktree_location()
  worktree.c: add validate_worktree()
</content>
</entry>
<entry>
<title>git-worktree.txt: fix indentation of example and text of 'add' command</title>
<updated>2018-02-16T21:12:27Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-02-16T20:44:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d023df1ee6fac80897aebe99cdefe7ec82067ce2'/>
<id>urn:sha1:d023df1ee6fac80897aebe99cdefe7ec82067ce2</id>
<content type='text'>
When 4e85333197 (worktree: make add &lt;path&gt; &lt;branch&gt; dwim, 2017-11-26)
added an example command in a literal code block, it neglected to
insert a mandatory "+" line before the block. This omission resulted
in both the literal code block and the (existing) paragraph following
the block to be outdented, even though they should be indented under
the 'add' sub-command along with the rest of the text pertaining to
that command. Furthermore, the mandatory "+" line separating the code
block from the following text got rendered as a leading character on
the line ("+ If &lt;commit-ish&gt;...") rather than being treated as a
formatting directive.

Fix these problems by adding the missing "+" line before the example
code block.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-worktree.txt: fix missing ")" typo</title>
<updated>2018-02-16T21:11:40Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-02-16T20:44:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=661a5a382e37c8a81e76ba803559075f3350a51c'/>
<id>urn:sha1:661a5a382e37c8a81e76ba803559075f3350a51c</id>
<content type='text'>
Add the closing ")" to a parenthetical phrase introduced by 4e85333197
(worktree: make add &lt;path&gt; &lt;branch&gt; dwim, 2017-11-26).

While at it, add a missing ":" at the end of the same sentence since
it precedes an example literal command block.

Reported-by: Mike Nordell &lt;tamlin.thefirst@gmail.com&gt;
Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
