Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, 25 Apr 2007, Carl Worth wrote:
> 
> Oops. I just noticed that that last command is wrong. Instead of "git
> checkout --track -b <branch>" that should of course be "git checkout
> --track -b <branch> origin/<branch>".

No, it really should be

	git branch --track newbranch origin/oldbranch

followed by

	git checkout newbranch

and then it's not so hard. It's two commands, but it's two _simpler_ 
commands, that make sense on their own. Don't use the complex version: 
it's a "expert mode" command that just knows how to do both.

Alternatively, we *could* make just

	git checkout --track branch

be a shorthand for

	git checkout --track -b branch origin/branch

when "branch" doesn't exist, but origin/branch does. With the "--track", 
it's already unambiguous (you cannot track a detached head, so we know we 
want a branch.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]