search

Home  >  Q&A  >  body text

一份代码能否同时托管于BAE和github?

在本地仅保存一份代码的时候能否同时托管于github与BAE?

假如github上有github.com/userName/projectName,同时自己在BAE上也有同名应用projectName时,如何才能保持这两个远程仓库公用一份本地代码来开发上传?

本人git新手,还望大神赐教。

PHPzPHPz2798 days ago705

reply all(2)I'll reply

  • 阿神

    阿神2017-04-24 09:13:32

    http://blog.codepiano.com/2013/07/03/push-multi-remote-repositories/

    If you use this method, you don’t need to push twice. You can upload it to all warehouses with one push.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-24 09:13:32

    Two new remote sources added:

    git remote add github github.com/userName/projectName
    git remote add bae  path.com/projectname
    

    After git commit, submit to two remote sources (default local master branch).

    git push github master
    git push bae master
    

    reply
    0
  • Cancelreply