On Tue, Jun 30, 2015 at 11:33 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Duy Nguyen <pclo...@gmail.com> writes:
>
>> I think this is like "git checkout -b" vs "git branch". We pack so
>> many things in 'checkout' that it's a source of both convenience and
>> confusion. I never use "git branch" to create a new branch and if I
>> had a way to tell checkout to "move away and delete previous branch",
>> I would probably stop using "git branch -d/-D" too. "--to" is another
>> "-b" in this sense.
>
> I didn't know "checkout --to" included "create a worktree elsewhere
> and chdir there"; if that "and chdir there" is not something you are
> doing, then I do not think "checkout -b" vs "branch" analogy applies.

Heh.. I do want that "chdir" (even for git-init and git-clone). We
can't issue "cd" command back to the parent shell, but we can spawn a
new shell with new cwd. But because the target dir is usually at the
end of the command line (except for "--to") and "cd !$" is not much to
type, it never bothers me enough to do something more. I think this is
another reason I prefer "git worktree add" to have the target dir at
the end.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to