"Ákos, Tajti" wrote:
> "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?

pull runs a fetch, which updated .git/FETCH_HEAD.  Now, if
.git/FETCH_HEAD has just one branch (and other not-for-merge entries),
there's no problem.  We just run update-ref HEAD, and get it to point
to the sole branch that was fetched.  If your fetch fetches multiple
branches, and you have a real branch (not "unborn") with
branch.<name>.merge set, we know which one of those branches to merge

Now, what you have is a fetch which fetches multiple branches, and
you're trying to merge that into a non-existent HEAD (or unborn
branch).  There is ambiguity and arguably no "right" thing to do,
which is why git complains.  I'm not sure if it's possible to argue
differently and patch git-pull.sh for your usecase.

There are many possible solutions to the problem, depending on what
you want.  The simplest I can suggest is: ignore the error for that
command and run git reset --hard.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to