Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github and Heroku repos? How to read, push, pull, and generally keep them synced [duplicate]

Possible Duplicate:
git push to multiple repositories simultaneously

I want to let other people read my rails app from github.

So I usually push repos to github and heroku. Now I want to do both with one app and keep them synced. How do you do this?

like image 634
thenengah Avatar asked May 16 '11 05:05

thenengah


1 Answers

You can start by pushing to multiple repos at one (configured with git remote, like git remote set-url).

git remote add all github:path/proj.git
git remote set-url --add --push all url = heroku:path/proj.git

That would generate a config like:

[remote "all"]
  url = github:path/proj.git
  url = heroku:path/proj.git

then:

git push all --all.

If your repos are writable only for you, you don't need to fetch from all of them in one operation. You only need to keep them update in one push.

like image 81
VonC Avatar answered Nov 09 '22 21:11

VonC