From: John Tapsell <johnflux@gmail.com>
To: Git List <git@vger.kernel.org>
Subject: git checkout -b origin/mybranch origin/mybranch
Date: Thu, 12 Mar 2009 11:36:03 +0000 [thread overview]
Message-ID: <43d8ce650903120436u261cb7e3p838e4a12e7b54d7d@mail.gmail.com> (raw)
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
next reply other threads:[~2009-03-12 11:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 11:36 John Tapsell [this message]
2009-03-12 11:40 ` git checkout -b origin/mybranch origin/mybranch 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43d8ce650903120436u261cb7e3p838e4a12e7b54d7d@mail.gmail.com \
--to=johnflux@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).