From: Brian Gernhardt Date: Mon, 23 Apr 2007 23:55:42 GMT Subject: Re: GIT vs Other: Need argument Message-ID: <655BF52F-9CD9-4C79-A6D0-5A3BDE9BE58F@silverinsanity.com> In-Reply-To: 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