如何在EGit中创建适当的新本地和远程分支组合? [英] How do I create a proper new local and remote branch combination in EGit?
问题描述
我想在EGit中执行以下操作:
$ git checkout -b newbranch
$ git push -u origin newbranch
这给了我一个新的本地分支,将它推送到上游服务器,创建正确的跟踪参考。如何在EGit中完成相同的操作?
对于第一个操作,您可以阅读EGit手册,还有已打开 bug 378960 允许在Push Branch向导中配置上游(在 EGit - 创建分支时正确设置远程跟踪)。
$ b
问题在于,当第一次推送一个分支时,这个(在push上配置上游)尚未自动完成
。
现在,您必须右键单击Git Repositories视图中的分支并选择
Configure Branch
,其中您可以设置上游配置。
注意: bug 378960 已在 Egit 3.2 :
推送分支/初始推送向导简化了推送分支,并且允许通过推送操作创建的新分支的上游配置:
I would like to do the following in EGit:
$ git checkout -b newbranch
$ git push -u origin newbranch
This gives me a new local branch, pushes it to the upstream server and creates the right tracking reference. How do I do the same in EGit?
For the first operation, you can read the EGit manual "Creating a New Local Branch "
Select Team > Switch To... > New Branch
For the push, see Vogella's Egit tutorial, but also the "Push ref specification"
Note: robinst has opened bug 378960 "Allow to configure upstream in Push Branch wizard" (mentioned in "EGit - set up remote tracking correctly when creating a branch").
The problem is that this (configuring the upstream on push) is not yet done automatically when first pushing a branch.
For now you have to right click on the branch in the Git Repositories view and choose "
Configure Branch
", where you can set up the upstream configuration.
Note: bug 378960 has been marked as resolved (February 2014) in Egit 3.2:
Push Branch / Initial Push wizard simplifies pushing a branch and also allows upstream configuration for new branches created by the push operation:
这篇关于如何在EGit中创建适当的新本地和远程分支组合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!