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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.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存储库pedz/ruby,它是shyouhei/ruby的分支,它是ruby/ruby的分支 ruby/ruby有一个名为1_9_3的分支,shyouhei/ruby没有这个分支 我有没有办法访问ruby/ruby的1_9_3分支 注意,我不能分叉ruby/ruby——至少我不知道如何分叉。当我在ruby/ruby页面上时,普通的“fork”按钮被回复为“your fork”按钮。点击该按钮,我将进入我的pedz/ruby页面。如果您想访问本地存储库上的1_9_3分支,请:

我有一个github存储库pedz/ruby,它是shyouhei/ruby的分支,它是ruby/ruby的分支

ruby/ruby有一个名为1_9_3的分支,shyouhei/ruby没有这个分支

我有没有办法访问ruby/ruby的1_9_3分支


注意,我不能分叉ruby/ruby——至少我不知道如何分叉。当我在ruby/ruby页面上时,普通的“fork”按钮被回复为“your fork”按钮。点击该按钮,我将进入我的pedz/ruby页面。

如果您想访问本地存储库上的1_9_3分支,请:

git remote add upstream url://to/ruby/repo
git fetch upstream
git checkout upstream/1_9_3
这样您就可以在本地访问分支机构。如果您希望该分支位于shyouhei,请继续:

git push origin 1_9_3

我一会儿就试试这个。问题:“上游”是一个特殊的名字还是可以任意命名?第三步我按照你的建议做了,戴上了一个分离的头。所以,我尝试了:git checkout ruby_1_9_3,这很管用。我故意让你在一个独立的头部,这样ruby_1_9_3的上游可以默认为你的本地报告。也许是你想要的,也许不是。@pedz upstream可以任意命名