Re: [PATCH 3/3] Teach "git branch" about --new-workdir
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 22, 2007, 23:37 UTC
- Message-ID
- <Pine.LNX.4.64.0707230033310.14781@racer.site>
- In-Reply-To
- <f80mbc$si1$1@sea.gmane.org>
Hi,
[re Cc'ed Julian]
On Mon, 23 Jul 2007, Jakub Narebski wrote:
Show 11 quoted lines
> Julian Phillips wrote: > > > I just think that to a user it feels like a checkout operation ... and > > that would less confusing as an option to checkout. ?Trying to explain > > that branch just creates a new branch, unless you give this option > > then it creates a working copy over there seems more compilcated than > > saying the checkout updates/creates this working copy, unless you use > > this option to create one over there. > > IMVHO git-checkout is characterized that it changes _current_ working > directory.
Actually, the name suggests that the important action is "checkout", so I agree with Julian here.
> But having this in git-checkout would mean that you can create new > workdir for _existing_ branch. git-branch is rather (except from > listing) for creating new branches.
Note that it is possible to checkout the current branch with "git checkout HEAD". Indeed, you can get the same effect with "git checkout -f HEAD" as with "git reset --hard" AFAIK.
> It is a fact that functionalities of git-checkout (-b) and git-branch > (--new-work-dir) intersect a bit.
Yes, I pointed that out, too. But we're not Python, so we do not have to pretend that it is a bad thing to have several way to do the same. Which allows us better to cater for user's expectations.
Ciao, Dscho