git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git checkout -b -t

From
John Tapsell <johnflux@gmail.com>
Date
Jun 2, 2009, 14:49 UTC
Message-ID
<43d8ce650906020749r36a0cceao20dc54d1446a6ea@mail.gmail.com>
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?

Also: $ git branch -D -t

Doesn't work.  I can see why, but it does make my life difficult :-D
John
Next: Junio C Hamano
Message 1 of 4 in “git checkout -b -t”
  1. John TapsellJun 2, 2009
  2. Junio C HamanoJun 2, 2009
  3. Matthieu MoyJun 2, 2009
  4. Michael J GruberJun 2, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.