How to create a new remote branch with EGit?

牧云@^-^@ 提交于 2019-12-03 06:04:37
VonC

You can follow the section "Configuring upstream push " in order to push a given branch:

Pushing a branch which doesn't exist yet on a remote repo will create it on said remote.

You can specify the refspec you want to use, or use Push ref specification.

That above would push all local branches.


Update December 2013 (Egit 3.2): as mentioned in robinst's answer (upvoted), you now have:

Push Branch / Initial Push wizard simplifies pushing a branch and also allows upstream configuration for new branches created by the push operation.
Improve UI of upstream configuration when creating a branch:

In EGit 3.2, there is now a dedicated wizard for this use case:

  1. Select TeamPush Branch... in the context menu

  2. In the wizard, you can change which remote you want to push to and whether pulling on this branch should merge or rebase:

  3. The next page will show a confirmation before doing the push, you can then finish the wizard.

After that, you can simply use Push to Upstream when the branch is checked out to push to the remote branch, or Pull to get the changes from the remote branch.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!