From: Eric Sunshine Date: Sat, 04 Jul 2015 08:54:20 GMT Subject: Re: [PATCH v2 13/23] worktree: introduce "add" command Message-ID: In-Reply-To: On Fri, Jul 3, 2015 at 10:53 PM, Duy Nguyen wrote: > On Sat, Jul 4, 2015 at 7:17 AM, Eric Sunshine wrote: >> COMMANDS >> -------- >> +add :: >> + >> +Check out `` into a separate working directory, ``, creating >> +`` if necessary. The new working directory is linked to the current >> +repository, sharing everything except working directory specific files >> +such as HEAD, index, etc. If `` already exists, it must be empty. > > Side note, "must be empty" is an implementation limitation. I think > the two-way merge employed by git-checkout can deal with dirty > and only perform the checkout if there is no data loss. But we can > leave this for later. Perhaps we should omit the bit about an existing but empty directory for now? Like this: Create `` and checkout `` into it. The new working directory is linked to the current repository, sharing everything except working directory specific files such as HEAD, index, etc.