Git git 提交多个仓库

adventurelw · 2013年04月15日 · 最后由 ippotsuko 回复于 2015年06月03日 · 4924 次阅读

先提交到 github: git remote add origin [email protected]:xxxx/yyy.git git push -u origin master 没问题

再提交到 gitcafe: git remote add origin2 [email protected]:xxxx/yyy.git git push -u origin2 master 以下信息: Warning: Permanently added the RSA host key for IP address '117.79.146.98' to the list of known hosts. Project identified as xxxx@yyy doesn't exist. fatal: The remote end hung up unexpectedly

但实际上 xxxx/yyy 存在,将.git/config 里面的 [remote "origin2"] 删除,修改 [remote "origin"] 中 url github 为 gitcafe,然后就可以顺利提交,但每次都改一下稍微有点麻烦。 请教怎么弄可以直接一点?比如我 git push -u origin master 到 github git push -u origin2 master 到 gitcafe 十分感谢。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号