Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.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
Git-如何创建等于fork base的分支_Git_Github_Git Branch - Fatal编程技术网

Git-如何创建等于fork base的分支

Git-如何创建等于fork base的分支,git,github,git-branch,Git,Github,Git Branch,我有一个回购协议的叉子。我在那里编辑了masterbranch。我想在我的repository中创建新分支,它将等于原始repo(我创建的这个repo)中的master。我该怎么做git branch newbraaanch origin/master给出的分支等于master,但在我的fork中 这很重要。我必须完成我的C++项目…< /p> < P>将原始的RPO添加为远程: git remote add foobar https://github.com/foo/bar 然后执行获取:

我有一个回购协议的叉子。我在那里编辑了
master
branch。我想在我的repository中创建新分支,它将等于原始repo(我创建的这个repo)中的
master
。我该怎么做
git branch newbraaanch origin/master
给出的分支等于
master
,但在我的fork中


这很重要。我必须完成我的C++项目…< /p> < P>将原始的RPO添加为远程:

git remote add foobar https://github.com/foo/bar
然后执行获取:

git fetch foobar
最后,该处:

git branch newbraaanch foobar/master

你应该删除C++标签,因为你的问题不是特定的或与C++相关的。