在不下载 repo 的情况下从 github 推送到 heroku [英] Push from github to heroku without downloading repo
本文介绍了在不下载 repo 的情况下从 github 推送到 heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 github 存储库,我想将它推送到一个 heroku 节点.第三位主持人将对此进行协调.由于我将大规模执行此操作,因此我想避免将存储库的内容下载到第三台主机上.我该怎么做?
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?
推荐答案
你不能直接从 Github 推送到 Heroku.
You can't push straight from Github to Heroku.
您将不得不使用第三台主机来协调推送.这可以从 Github post-receive hook 中触发.
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.git
git remote add heroku git@heroku.com:app.git
git push heroku refs/remotes/github/master:refs/heads/master
这篇关于在不下载 repo 的情况下从 github 推送到 heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文