git SourceTree - 如何结帐到远程仓库分支
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40262364/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SourceTree - how to checkout to remote repo branch
提问by Pavlo
I create a new branch in remote GIT repository. Repository stored on BitBucket.
我在远程 GIT 存储库中创建了一个新分支。存储在 BitBucket 上的存储库。
In my my local repository I can see this new branch with SourceTree. It appears in commits list, on same commit I create branch from. But I cannot see this new branch under branches list and cannot checkout it.
在我的本地存储库中,我可以看到这个带有 SourceTree 的新分支。它出现在提交列表中,在我创建分支的同一个提交中。但是我在分支列表下看不到这个新分支,也无法结帐。
I want to checkout and push updated on my local workstation code to remote repository back, but within exactly this new branch. I started development on same branch, what was source to clone new branch.
我想签出并将更新的本地工作站代码推送到远程存储库,但恰好在这个新分支内。我在同一个分支上开始开发,克隆新分支的源是什么。
I tried to pull this new branch. It is empty as it should, but it still not under branches list and I cannot checkout it.
我试图拉这个新分支。它应该是空的,但它仍然不在分支列表下,我无法结帐。
How to commit to this new branch?
如何提交到这个新分支?
回答by VonC
With SourceTree(1.9.6.1) alone (not talking about the command-line here), make sure:
单独使用SourceTree(1.9.6.1)(这里不讨论命令行),请确保:
- you have fetched the repo
- your log view is set to "All Branches" (not"current branches")
- "Show Remote Branches" is selected
- 你已经获取了 repo
- 您的日志视图设置为“所有分支”(不是“当前分支”)
- 选择了“显示远程分支”
Note: the BRANCHES
section at the left side of the log view only display localbranches, not the remote ones.
The remote branches are list in the REMOTES/origin
section, just below BRANCHES
and TAGS
.
注意:BRANCHES
日志视图左侧部分只显示本地分支,不显示远程分支。
远程分支在REMOTES/origin
部分中列出,就在BRANCHES
和下方TAGS
。
By double-clicking on the remote branch, you can create a new local branch.
通过双击远程分支,您可以创建一个新的本地分支。