同时push到GitHub和Gitee

Posted yangzongzhuan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了同时push到GitHub和Gitee相关的知识,希望对你有一定的参考价值。

修改.git/config如下:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    # 合并2个 remote 配置
    url = https://gitee.com/project/sdk.git
    url = https://github.com/project/sdk.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

 

以上是关于同时push到GitHub和Gitee的主要内容,如果未能解决你的问题,请参考以下文章