【发布时间】:2012-08-01 13:12:37
【问题描述】:
我有以下 git 远程配置,以便将更改推送到两个单独的存储库(受 pull/push from multiple remote locations 启发):
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@bitbucket.org:sgrodzicki/test.git
url = git@github.com:sgrodzicki/test.git
这很好用,直到我在某处制作新的克隆:
git clone git@bitbucket.org:sgrodzicki/test.git
克隆配置只有一个主机:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@bitbucket.org:sgrodzicki/test.git
与其他存储库(GitHub)相同:
git clone git@github.com:sgrodzicki/test.git
然后它看起来像这样:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:sgrodzicki/test.git
我的问题是:如何使这些配置更改在两台主机上都可见?
【问题讨论】:
标签: git github bitbucket git-remote