【发布时间】:2015-07-19 19:46:51
【问题描述】:
我有两个遥控器 - origin 指向我的 fork 和 upstream 指向公司 repo。
$git remote -v
origin https://github.com/me/app.git (fetch)
origin https://github.com/me/app.git (push)
upstream https://github.com/company/app.git (fetch)
upstream https://github.com/company/app.git (push)
我在一个月前分叉了。我一直在推动起源,然后向上游提出拉取请求。这很好。
现在有人在上游创建了一个名为“3D_Theory”的分支,我想首先将该新分支反映到我的原点,然后从该分支开始工作。但由于某种原因,该分支没有反映在我的起源中。
我尝试了以下方法:
git remote show origin
>> does not list 3D_Theory
git remote show upstream
>> lists 3D_Theory
我试过了:
git fetch upstream
git checkout master
git merge upstream/3D_Theory
但我仍然没有在我的 fork 上创建那个分支。如何在上游建立一个新分支来反映我的 fork?
谢谢
以下类似问题都没有帮助我:
【问题讨论】:
标签: git github version-control git-merge git-fork