8
可能重复:
git push to multiple repositories simultaneouslyGithub和Heroku回购?如何阅读,推,拉,一般让他们同步
我不想让其他人从GitHub读我的Rails应用程序。
所以我通常推回购github和heroku。现在我想用一个应用程序同时执行这两个应用程序并保持同步。你怎么做到这一点?
可能重复:
git push to multiple repositories simultaneouslyGithub和Heroku回购?如何阅读,推,拉,一般让他们同步
我不想让其他人从GitHub读我的Rails应用程序。
所以我通常推回购github和heroku。现在我想用一个应用程序同时执行这两个应用程序并保持同步。你怎么做到这一点?
您可以先推送至multiple repos at one(配置为with git remote
,如git remote set-url
)。
git remote add all github:path/proj.git
git remote set-url --add --push all url = heroku:path/proj.git
这将产生类似的配置:
[remote "all"]
url = github:path/proj.git
url = heroku:path/proj.git
则:如果您的回购是只为你写
git push all --all.
,你不需要从他们全部取在一次操作中。您只需要一次性保持更新。