From: Michael J Gruber Date: Tue, 02 Jun 2009 15:25:53 GMT Subject: Re: git checkout -b -t Message-ID: <4A254481.3020104@drmicha.warpmail.net> In-Reply-To: <43d8ce650906020749r36a0cceao20dc54d1446a6ea@mail.gmail.com> John Tapsell venit, vidit, dixit 02.06.2009 16:49: > Hey all, > > I've become the "guy to ask about git" in my company and people are > always getting into a mess with git. So in turn I try to get git to > be a more friendly. Today someone had a problem. Basically they had > done: > > $ git checkout -t origin/mybranch > fatal: git checkout: --track and --no-track require -b > > So they do exactly what it tells them: > $ git checkout -b -t origin/mybranch > Switched to a new branch "-t" > > doh > > How can we make this less easy for people to shoot themselves in the > foot? The behavior of -t has changed recently iirc, so I think that > problem has gone away? git 1.6.1 and above contains DWIMery which, in the case above, would automatically behave like git checkout -t origin/mybranch -b mybranch which complains in case 'mybranch' exists already, without pointing at '-b', though. Do you think this creates a new type of head aches for your patients? > > Also: > $ git branch -D -t > > Doesn't work. I can see why, but it does make my life difficult :-D > > John