I have a github repo that I want to push to a heroku node. A 3rd host will be co-ordinating this. As I'm going to be doing this on a large scale I want to avoid having to download the contents of the repo onto the 3rd host. How do I do it?
A:
I don't think you can push directly from GitHub to another remote repo.
So if you have many apps to push, you may consider an organization using submodules, like in this SO question.
You would still have to download a repo to push it on the Heroku node, but at least you can control what to pull/push (and do some cleaning between each push).
VonC
2010-07-24 11:30:24
I won't actually be the owner of the apps(I'm building a cloud based service) so I won't have control over how they are organised.
opsb
2010-07-25 06:02:36
+2
A:
You can't push straight from Github to Heroku.
You're going to have to use the third host to coordinate the push. This could be fired from a Github post-receive hook.
To sync straight across use something like:
git remote add github [email protected]:user/repo.git
git remote add heroku [email protected]:app.git
git push heroku refs/remotes/github/master:refs/heads/master
David Dollar
2010-07-30 16:46:11