- 如果已经存在A源,先删除已存在的远程源A
git remote rm 仓库A(名称)
- 使用
git remote set-url
命令增加源, 也就是在已存在的仓库B源基础上 增加 仓库A的远程源
git remote set-url --add 仓库B(名称) http://仓库A地址
- 查看远程源
git remote -v
- 同步推送
git remote rm 仓库A(名称)
git remote set-url
命令增加源, 也就是在已存在的仓库B源基础上 增加 仓库A的远程源git remote set-url --add 仓库B(名称) http://仓库A地址
git remote -v