pull/push from multiple remote locations

后端 未结 15 1293
傲寒
傲寒 2020-11-21 10:17

The short: is there a way to have a git repo push to and pull from a list of remote repos (rather than a single \"origin\")?

The long:

15条回答
  •  走了就别回头了
    2020-11-21 10:45

    Since git 1.8 (October 2012) you are able to do this from the command line:

    git remote set-url origin --push --add user1@repo1
    git remote set-url origin --push --add user2@repo2
    git remote -v
    

    Then git push will push to user1@repo1, then push to user2@repo2.

提交回复
热议问题