[Bug] cloning a repository with a default MASTER branch tries to check out the master branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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.
Checking out the MASTER branch manually afterwards works.

$ git clone git@xxxxxxxxxx: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.

$ cd UPPERCASE-NPM
$ ls -a
. .. .git
$ git branch
$ git checkout MASTER
Branch MASTER set up to track remote branch MASTER from origin.
Switched to a new branch 'MASTER'
$ ls -a
. .. .git NPM package.json README
$ git branch
* MASTER

Some platform information:

$ git version
git version 2.12.2

$ uname -a
Linux felix-probook 4.10.13-1-ARCH #1 SMP PREEMPT Thu Apr 27 12:15:09
CEST 2017 x86_64 GNU/Linux

Git was installed from the default Arch Linux package.

Thanks,
Félix





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]