Starting a new project remotely
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Jan 15, 2006, 18:45 UTC
- Message-ID
- <Pine.LNX.4.64.0601151323320.25300@iabervon.org>
Is there something currently that acts like git-clone, except that it sets up automatic connections in the opposite direction? That is, you run it in a repository with no origin, and it pushes the data to the specified location (which probably needs to be set up already as an empty repository) and sets the local side's origin remote to the location given.
This recipe seems to work:
git branch origin master echo >$GIT_DIR/remotes/origin \ "URL: $repo Pull: $head_points_at:$origin" git push origin $origin:refs/heads/$head_points_at
(where $origin is "origin", $head_points_at is "master", $repo is the target repository, "origin" is the remote you want to create, and "master" is the head that currently holds the commit you want to push)
-Daniel *This .sig left intentionally blank*