git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: misleading "man git-worktree", is last "add" argument necessarily a "branch"?

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Jan 17, 2018, 13:42 UTC
Message-ID
<alpine.LFD.2.21.1801170541570.17204@localhost.localdomain>
In-Reply-To
<CACsJy8A0BcdqwkDDd0Fx_8DDCgJc6gZaXkcYqysdv8BH1nvibQ@mail.gmail.com>
On Wed, 17 Jan 2018, Duy Nguyen wrote:
Show 14 quoted lines
> On Wed, Jan 17, 2018 at 7:58 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >
> >   perusing "git worktree", and man page reads:
> >
> >   SYNOPSIS
> >        git worktree add [-f] [--detach] [--checkout] [--lock]   \
> >                         [-b <new-branch>] <path> [<branch>]
> >                                                  ^^^^^^^^^^
> >
> > however, can't that last optional argument be any arbitrary commit,
> > not just a "branch"?
>
> It's been changed to commit-ish about two months ago in c4738aedc0
> (worktree: add can be created from any commit-ish - 2017-11-26)
  guess i better update my repo, thanks.
rday
Previous: Duy NguyenNext: Junio C Hamano
Message 3 of 4 in “misleading "man git-worktree", is last "add" argument necessarily a "branch"?”
  1. Robert P. J. DayJan 17, 2018
  2. Duy NguyenJan 17, 2018
  3. Robert P. J. DayJan 17, 2018
  4. Re* misleading "man git-worktree", is last "add" argument necessarily a "branch"?Junio C Hamano, Jan 17, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.