可以看这篇文章 http://stackoverflow.com/questions/5785549/able-to-push-to-all-Git-remotes-with-the-one-command
一、通过命令行进行操作
例如我有下面两个仓库:
Mybatis通用Mapper
https://git.oschina.net/Spring/Spring-Boot.git
https://github.com/Spring/Spring-Boot.git
https://git.oschina.net/free/Mapper.git
https://github.com/abel533/Mapper.git
在项目路径下打开Git Bash Here
输入:git remote add all https://git.oschina.net/Spring/Spring-Boot.git
再添加另一个:git remote set-url --add all https://github.com/Spring/Spring-Boot.git
如果有多个,按照上面这一个命令进行添加.
提交的时候输入:git push all --all