git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git init doesn't create master branch

From
Junio C Hamano <gitster@pobox.com>
Date
May 29, 2013, 18:37 UTC
Message-ID
<7va9ndtyxj.fsf@alter.siamese.dyndns.org>
In-Reply-To
<51A5FC17.8000608@intland.com>
"Ákos, Tajti" <akos.tajti@intland.com> writes:
Show 11 quoted lines
> Thanks for clarifying this thing for me! I don't really insist on
> having a master branch it's just that I tried to pull from a
> repository bundle and I got this error message:
>
> "Cannot merge multiple branches into empty head"
>
> The command was:
>
> git pull ../dump.dmp refs/heads/*:refs/heads/*
>
> Is this a better way of doing this?

You are not trying to merge all branches contained in the dump, so "pull" is a wrong thing to use here.

    $ git fetch --update-head-ok ../dump.dmp refs/heads/*:refs/heads/*

would be one way. Or you could just use the dumpfile as if it were a normal remote and say (without running "git init")

    $ git clone dump.dmp undump

to extract it in a new directory "undump" (this may require your dumpfile created with HEAD, though).

Previous: Ramkumar Ramachandra
Message 8 of 8 in “git init doesn't create master branch”
  1. Ákos, TajtiMay 29, 2013
  2. Matthieu MoyMay 29, 2013
  3. Ramkumar RamachandraMay 29, 2013
  4. Ákos, TajtiMay 29, 2013
  5. Matthieu MoyMay 29, 2013
  6. Ákos, TajtiMay 29, 2013
  7. Ramkumar RamachandraMay 29, 2013
  8. Junio C HamanoMay 29, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.