配置Eclipse / EGit以跟踪上游存储库 [英] Configuring Eclipse / EGit to track an upstream repository

查看:117
本文介绍了配置Eclipse / EGit以跟踪上游存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用EGit(如新的Eclipse 4.2 Juno版本中提供的)。



我有一个GitHub上的存储库,我已经从另一个上游存储库分叉了。



当我从Github的存储库中在Eclipse中创建一个项目时,它正确地设置 origin 来指向GitHub库。但是它并不知道上游存储库(从中我想要合并更改)。



我可以手动从上游存储库中成功合并(使用Team /远程/从...获取... /自定义URI,并提供上游存储库详细信息),但是每次都有一点乏味。



然而有什么办法告诉Eclipse自动从上游存储库合并?

解决方案

在git中选择 Remotes 节点存储库视图,使用创建远程,输入上游作为名称,选择 configure fetch 。在以下对话框中,您可以手动指定refspec。



之后,您可以在远程下有2个条目,并且可以轻松地通过使用所需节点上的上下文菜单从一个提取。


I'm using EGit (as provided within the new Eclipse 4.2 Juno release).

I have a repository on GitHub which I have forked from another upstream repository.

When I create a project in Eclipse from the repository on Github, it correctly sets origin to point to the GitHub repository. But it doesn't yet know anything about the upstream repository (from which I want to merge changes).

I can successfully merge from the upstream repository manually (using "Team / Remote / Fetch From... / Custom URI " and providing the upstream repository details) however it is a bit tedious doing this every time.

However is there any way to tell Eclipse to merge from the upstream repository automatically?

解决方案

Select the Remotes node in the git repository view, use create remote, enter "upstream" as name, select configure fetch. In the following dialog you can specify the refspec exactly as you did when you fetched manually.

Afterwards you have 2 entries under Remote and can easily fetch from one by using the context menu on the wanted node.

这篇关于配置Eclipse / EGit以跟踪上游存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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