git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git checkout -b origin/mybranch origin/mybranch
@ 2009-03-12 11:36 John Tapsell
  2009-03-12 11:40 ` Sverre Rabbelier
  2009-03-12 11:43 ` Johannes Schindelin
  0 siblings, 2 replies; 20+ messages in thread
From: John Tapsell @ 2009-03-12 11:36 UTC (permalink / raw)
  To: Git List

Hey all,

  One of my collegues did:

git checkout origin/somebranch

  git complained that they need to specify the name with -b.  So they did:

git checkout -b origin/somebranch origin/somebranch

  Git accepts this with no problems, but boy - all hell broke loose.
Doing a push or pull gave errors, because "origin/somebranch" is now
ambigous (since there is two of them).  They can't even:  "git
checkout -b somebranch origin/somebranch"  anymore, since
"origin/somebranch" is ambigous.  It all got into a mess.

  I've sort it out now, but I'd like to request that git doesn't so
easily let the user shoot themselves in the foot.

  I propose that creating a branch called  "origin/*" or "remotes/*"
gives at _least_ a warning, and preferably an error (overrideable with
--force for people who really really want to do it)

John Tapsell

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-03-13 14:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-12 11:36 git checkout -b origin/mybranch origin/mybranch John Tapsell
2009-03-12 11:40 ` Sverre Rabbelier
2009-03-12 11:43 ` Johannes Schindelin
2009-03-12 11:48   ` John Tapsell
2009-03-12 13:02     ` Johannes Schindelin
2009-03-12 13:18       ` John Tapsell
2009-03-12 13:43         ` Sverre Rabbelier
2009-03-12 14:14           ` John Tapsell
2009-03-13 14:08             ` Michael J Gruber
2009-03-12 15:21           ` Pieter de Bie
2009-03-12 15:37             ` Jeff King
2009-03-12 16:16               ` John Tapsell
2009-03-12 16:35                 ` Jeff King
2009-03-12 16:40                   ` Pieter de Bie
2009-03-12 16:51                     ` Jeff King
2009-03-12 16:58                       ` John Tapsell
2009-03-12 17:14                         ` Jeff King
2009-03-12 17:45                           ` John Tapsell
2009-03-12 16:45                   ` John Tapsell
2009-03-12 18:31         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).