From: Junio C Hamano <gitster@pobox.com>
To: "Félix Saparelli" <felix@passcod.name>
Cc: git@vger.kernel.org
Subject: Re: [Non-Bug] cloning a repository with a default MASTER branch tries to check out the master branch
Date: Tue, 23 May 2017 12:40:36 +0900 [thread overview]
Message-ID: <xmqqa864mea3.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CACQm2Y1QtKD3M6weNhGrAQSLV8hLF4pKcpHDD7iUc78aWrt6Cw@mail.gmail.com> (=?utf-8?Q?=22F=C3=A9lix?= Saparelli"'s message of "Tue, 23 May 2017 09:42:12 +1200")
Félix Saparelli <felix@passcod.name> writes:
> I created a git repository that, for joke reasons, has a single branch
> called MASTER (in uppercase). Upon cloning this repo, git attempts to
> checkout the master branch (in lowercase), which does not exist.
See what Git told you carefully and you can guess, I think.
> $ git clone git@github.com:passcod/UPPERCASE-NPM.git
> Cloning into 'UPPERCASE-NPM'...
> remote: Counting objects: 14, done.
> remote: Compressing objects: 100% (11/11), done.
> remote: Total 14 (delta 3), reused 14 (delta 3), pack-reused 0
> Receiving objects: 100% (14/14), done.
> Resolving deltas: 100% (3/3), done.
> warning: remote HEAD refers to nonexistent ref, unable to checkout.
So you have MASTER but not master, but your HEAD still is pointing
at non-existing master. As HEAD is the way the remote tells the
clone what the default branch to be checked out is, the command
reports "we cannot do a checkout of the default branch."
next prev parent reply other threads:[~2017-05-23 3:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 21:42 [Bug] cloning a repository with a default MASTER branch tries to check out the master branch Félix Saparelli
2017-05-23 3:40 ` Junio C Hamano [this message]
2017-05-23 23:24 ` [Non-Bug] " Philip Oakley
2017-05-24 14:19 ` Jeff King
2017-05-25 1:36 ` Junio C Hamano
2017-05-25 3:13 ` Junio C Hamano
2017-05-25 15:59 ` Jeff King
2017-05-25 19:11 ` Jeff King
2017-05-25 23:28 ` Junio C Hamano
2017-05-26 20:00 ` Philip Oakley
2017-05-26 21:17 ` Philip Oakley
2017-05-27 23:55 ` Junio C Hamano
2017-05-28 11:21 ` Philip Oakley
2017-05-28 12:57 ` Junio C Hamano
2017-05-31 4:43 ` Jeff King
2017-05-23 8:01 ` [Bug] " Samuel Lijin
2017-05-23 12:12 ` Jeff King
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=xmqqa864mea3.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=felix@passcod.name \
--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).