Push from github to heroku without downloading repo Push from github to heroku without downloading repo heroku heroku

Push from github to heroku without downloading repo


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 git@github.com:user/repo.gitgit remote add heroku git@heroku.com:app.gitgit push heroku refs/remotes/github/master:refs/heads/master


Codeship.io does this as a service now, and automatically configures the appropriate git webhooks on public or private github repos.

There are a few other "continuous integration as a service" (CIAAS) options out there, but in general they get around the problem you're specifically presenting: web hooks need to hit a 3rd-party service, which in turn can trigger the heroku build process.

These CIAAS hosts act as the 3rd-party, and usually offer a free tier for public projects. You can also roll your own by deploying a web hook receiving server, which can both pull and push git repos.


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).