Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
567 views
in Technique[技术] by (71.8m points)

git - Push from github to heroku without downloading repo

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...