Re: GIT vs Other: Need argument

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

 



On Apr 23, 2007, at 7:24 PM, Linus Torvalds wrote:

So I don't really see the problem with just saying:

- the remote *has* a default branch. That's the one you get by default
   with "git clone".

- if you want to track another branch, you should just tell git that you
   want to track it, and switch to that instead:

	git branch --track mybranch origin/otherbranch
	git checkout mybranch

   and be happy with it.

Yes, it's two extra commands, but they aren't *that* hard to explain,
after all. You really can basically explain each stage both very simply
and naturally with just
It's even better than that.  Just use "git checkout --track -b  
mybranch origin/otherbranch".  Slightly cumbersome, but is only one  
command.  And easily explained: "Checkout a tracking branch named  
mybranch for origin/otherbranch".
And the --track can be removed by using branch.autosetupmerge for  
people who always want it.
Actually the man page appears to be minorly incorrect.  It has "[-b  
[ --track | --no-track ]", which doesn't work.  Git gives me "git  
checkout: updating paths is incompatible with switching branches/ 
forcing".  I think it's interpreting --track as the new branch name.   
I'll send a patch reversing the order of the arguments in the man page.
~~ Brian
-
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]