首先github和码云上的仓库都要建好。然后将其中一个仓库clone到本地
git clone XXXXX
修改.git里面的配置文件config
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true [remote "github"] url = https://github.comnote fetch = +refs/headsnote fetch = +refs/headsnote # 在这里添加码云的url url = https://gitee.comnote fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master
这样提交时只用git push origin master,不用分别提交。



