如何使用EGit创建一个新的远程分支? [英] How to create a new remote branch with EGit?

查看:121
本文介绍了如何使用EGit创建一个新的远程分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个Eclipse项目,该项目通过EGit使用版本控制,并与远程存储库 git@myrepo.com:git2013 连接。在我的项目中,在本地分支 newstuff 下,我创建并更改了一些文件。现在,我想将其推送到远程存储库中名为 newstuff 的远程分支中。但是我的远程存储库仅包含一个分支 master



如何创建一个名为<$ c的新远程分支$ c> newstuff ?



PS:请不要使用命令行git命令回答;

解决方案

您可以按照 或使用:如 robinst answer (已批准),您现在拥有:


Push Branch / Initial Push向导简化了对分支的推送,还允许对由push操作创建的新分支进行上游配置。

改进UI创建分支时的上游配置:



Let's say I have an Eclipse Project which uses versioning control with EGit and is connected with a remote repository git@myrepo.com:git2013. In my project, under the local branch newstuff, I create and change some files. Now, I want to push this to a remote branch named newstuff in my remote repository. But my remote repository only holds a branch master.

How do I create a new remote branch called newstuff?

PS: Please do not answer with command-line git commands; describe how to do it in EGit.

解决方案

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:

这篇关于如何使用EGit创建一个新的远程分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆