2015-05-22 71 views

回答

0

添加你需要

git add remote **remote1** [email protected]:company/project.git 
git add remote **remote2** [email protected]:othercompany/project.git 

现在你可以与2个遥控器并肩工作所需的遥控器。

gii pull remote1 brancha 

git push remote2 brancha 

这正是遥控器的用途。
阅读更多关于遥控器here

一旦您设置了遥控器,您可以并排使用它们来完成您的工作。

0

干净的方式显然是正确设置您的遥控器。但是,如果你真的想要一个别名主机与另一个,你可以在.ssh/config这样做(读man ssh_config)像

Host gitlab.com 
HostName bitbucket.com 

这将适用于SSH的所有用途。我建议反对它,因为有一天你最终会忘记这个别名,并且抱怨ssh gitlab.com没有连接到gitlab.com

我不认为你可以别名路径到另一个虽然。