无需下载回购即可从github推送到heroku

ops*_*psb 37 git github heroku

我有一个github repo,我想推送到heroku节点.第三位主持人将协调这一点.由于我将要大规模地执行此操作,因此我希望避免将repo的内容下载到第3台主机上.我该怎么做?

Dav*_*lar 47

你不能直接从Github推进到Heroku.

您将不得不使用第三个主机来协调推送.这可以从Github post-receive hook中触发.

要直接同步使用以下内容:

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
Run Code Online (Sandbox Code Playgroud)

  • 不是我想要的答案,但对于看这个问题的人来说可能是最有用的. (4认同)
  • 我选择了一个更简单的设置:创建一个github仓库,在本地克隆它,将heroku添加为远程,然后只需`git push heroku master`. (3认同)