git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Carlos Pereira <jose.carlos.pereira@ist.utl.pt>
To: git@vger.kernel.org
Subject: howto to run git without a master branch
Date: Sat, 08 Mar 2014 21:37:21 +0000	[thread overview]
Message-ID: <531B8D91.6020800@ist.utl.pt> (raw)

Hi,
git newbie here.

I would like to work with two main branches: master-g and master-x, 
instead of the usual master, and apparently git does not like this.

After creating a local repository with these two branches, and a server 
repository with git init --bare, and pushing the two branches:

git remote add origin foo@bar:~/path/test.git
git push origin master-g
git push origin master-x

everything seems fine, but cloning:
git clone foo@bar:~/path/test.git
terminates with a warning: remote HEAD refers to nonexistent ref, unable 
to checkout.

On the original local repository, I have:
 >cat HEAD
ref: refs/heads/master-x

But on the server repository or the clone repository, HEAD points to 
master branch, that does not exist:
 >cat HEAD
ref: refs/heads/master

Replacing in the HEAD file, master by master-g (on the server before 
cloning, or on the clone after cloning) seems to solve the problem.

Shall I worry about this? does my fix (editing directly HEAD on the 
server) fixes really the problem? what would be the correct procedure to 
avoid this?

Thank you!
Carlos Pereira,

             reply	other threads:[~2014-03-08 21:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-08 21:37 Carlos Pereira [this message]
2014-03-09  7:46 ` howto to run git without a master branch Torsten Bögershausen
2014-03-09 19:54   ` Carlos Pereira
2014-03-09 20:00     ` Kevin
2014-03-09 22:16     ` Ilya Bobyr
2014-03-09 23:58       ` Carlos Pereira
2014-03-10  9:30       ` Andreas Schwab

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=531B8D91.6020800@ist.utl.pt \
    --to=jose.carlos.pereira@ist.utl.pt \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).