方法1(修改文件)
修改项目目录下隐藏文件.git中的config文件,在[remote “origin”]中添加多个仓库地址就可以了,参考如下:
[remote "origin"]
url = https://gitee.com/a/test1.git
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://github.com/b/test1.git
方法2(命令)
先添加gitee地址
git remote add origin https://gitee.com/a/test1.git
再添加github地址
https://github.com/b/test1.git