在本地 git 仓库里找到这个文件 .git/config, 内容如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "gitee"] url = https://gitee.com/johng/gf.git fetch = +refs/heads/*:refs/remotes/origin/* [remote "origin"] url = https://github.com/gogf/gf fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master |
改为如下:
合并 2 个 remote 配置
1 2 3 4 5 6 7 8 9 10 11 12 |
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = https://github.com/gogf/gf url = https://gitee.com/johng/gf.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master |