On Nov 13, 2007, at 5:50 AM, Matthieu Moy wrote:
While clone normally does a bit more:
[remote "origin"]
url = /tmp/git1/.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
But how is clone expected to do that when the origin is an empty
repo? There is no branch for it to track, and automagically setting
it to master is bogus because then it's tracking something that
doesn't exist.
The easy way to set up the last bit is "git checkout -b master --track
origin/master". But that won't work if origin/master doesn't exist.
The following will always work:
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
But asking git-clone do do this sort of odd magic for an empty repo is
dubious at best. Perhaps convenient for your situation, but creates
repos that don't actually work. (Will give errors when trying to
merge a non-existent branch, at the very least.)
~~ Brian
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html