pull/push from multiple remote locations

后端 未结 15 1581
傲寒
傲寒 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:47

    I added these aliases to my ~/.bashrc:

    alias pushall='for i in `git remote`; do git push $i; done;'
    alias pullall='for i in `git remote`; do git pull $i; done;'
    

提交回复
热议问题