【发布时间】:2013-03-21 18:23:38
【问题描述】:
我已经分叉了一个 repo,我的所有工作都进入了那个 fork(我的起源),我将上游分支与拉取请求合并。相当标准。
但是现在上游仓库中有一个新分支,我不知道如何在本地获取该新分支,然后将其推送到我的原点。这是我的情况。
$ git remote show origin
* remote origin
Fetch URL: git@github.com:rackspace/jclouds.git
Push URL: git@github.com:rackspace/jclouds.git
HEAD branch: master
Remote branches:
1.5.x tracked
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)
$ git remote show upstream
* remote upstream
Fetch URL: https://github.com/jclouds/jclouds
Push URL: https://github.com/jclouds/jclouds
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
我知道 jclouds/jclouds 中有一个 1.6.x 分支,我想在本地获取该分支,然后将其推送到 rackspace/jclouds。我试过这个命令
$ git fetch upstream 1.6.x
From https://github.com/jclouds/jclouds
* branch 1.6.x -> FETCH_HEAD
看起来它已获取分支,但我在 git remote show 或 git branch -a 中看不到它,因此我无法设置本地跟踪分支。
我错过了什么?
【问题讨论】:
标签: git git-branch