2017-08-03 87 views
0

我叉的存储库,设置远程配置:GIT:从叉库创建分支

git remote -v 
origin https://github.com/myAccount/someRepo.git (fetch) 
origin https://github.com/myAccount/someRepo.git (push) 
upstream https://github.com/someAccount/someRepo.git (fetch) 
upstream https://github.com/someAccount/someRepo.git (push) 

但我想创建分支:

https://github.com/myAccount/someRepo.git 

如果我在本地,然后创建一个分支推分支,那个分支只会去origin

例如:

git checkout -b debug 

git push -u origin debug 
+0

@ das-g我想知道的是创建一个分支,它只会在原点上创建? – user2924482

+0

我已经改写你的问题(有希望)更清楚。它仍然问你想问什么? –

+0

是的。你必须指定发送上游,如果这是你想'git push --set-upstream origin debug'。 – Darlesson

回答

0

如果你运行:

git push -u <remote> <branch> 

这将(一)推动分支<branch>远程<remote>,和(b)之后,在该分支运行git push而将始终推送到<remote>。我相信这会回答你的问题。