程序员

git一个项目设置多个远程仓库

2016-06-22  本文已影响1711人  lixiaohao

git设置多个远程仓库有两种方法

1.使用git remote
git remote add origin https://git.coding.net/lixiaohao/phaser-flappybird.git
2.修改.git/config配置文件
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = true
[remote "origin"]
        url = git@git.coding.net:lixiaohao/phaser-flappybird.git
        url = git@github.com:lh4111/phaser-flappybird.git
        #在这里添加一行 url = xxx 即可
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

上一篇 下一篇

猜你喜欢

热点阅读