Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在github关闭时将分支直接拉到另一台机器上_Git_Github - Fatal编程技术网

如何在github关闭时将分支直接拉到另一台机器上

如何在github关闭时将分支直接拉到另一台机器上,git,github,Git,Github,当GitHub崩溃时,git pull不再工作,因为团队中的每个人都将其用作集中回购。看起来我们应该能够将另一台机器设置到上游,并直接从它们那里拉动。我们如何做到这一点?您可以轻松添加另一个遥控器,例如 git remote add other git@other-host:repo.git 然后你可以从中拉或推,例如 git pull other master git push other master 如果您在团队中工作,您可以通过IP添加同事的远程主机,直接从他们的主机中提取,因此您不

当GitHub崩溃时,
git pull
不再工作,因为团队中的每个人都将其用作集中回购。看起来我们应该能够将另一台机器设置到上游,并直接从它们那里拉动。我们如何做到这一点?

您可以轻松添加另一个遥控器,例如

git remote add other git@other-host:repo.git
然后你可以从中拉或推,例如

git pull other master
git push other master
如果您在团队中工作,您可以通过IP添加同事的远程主机,直接从他们的主机中提取,因此您不必依赖GitHub。例如

git remote add John username@192.168.0.123:/path/to/repo
要实现这一点,请确保您对他们的机器具有正确的SSH访问权限