如何获得一个新分支以显示在Eclipse Git远程跟踪中? [英] How do I get a new branch to show up in Eclipse Git Remote Tracking?

查看:631
本文介绍了如何获得一个新分支以显示在Eclipse Git远程跟踪中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有的Eclipse git项目,在本地和远程跟踪中都有一个master和development分支。我刚刚在git存储库中添加了一个新分支,但是我不知道如何将其显示在Eclipse中。

I have an existing Eclipse git project, with a master and development branch present in both local, and remote tracking. I have just added a new branch in my git repository, but I can't figure out how to get it to show up in Eclipse.

我尝试阅读有关此主题的信息,但似乎只是希望它自动显示出来。我发现了很多类似的问题,但是它们似乎都解决了远程跟踪文件夹完全为空的问题,而不是我只缺少一个新分支的问题。我已经有Master和Develop了。

I have tried to read up on the subject, but it seems like it is just expected to automatically show up. I have found a lot of similar questions, but they all seem to deal with the issues of a completely empty remote tracking folder, instead of my problem of only a single new branch missing. I already have Master and Develop present.

这是行不通的:


  • 在Git存储库窗口中单击刷新。

  • 我能找到的任何一种同步,提取或其他更新方式

这是可行的方法:


  • 右键单击远程跟踪文件夹,然后选择粘贴存储库路径或URI。如果这样做,并选择与那里完全相同的路径,则可以看到我的新分支。此操作确实需要我再次将整个存储库完全克隆到一个空文件夹,而这并不是它的预期工作方式。

  • 我相信使用某种方法可能会起作用命令行工具,但是我真的想要一个Eclipse解决方案,因为我确信它存在,而且我只是缺少了一些东西。

推荐答案

Git存储库 视图中:

In the Git Repositories view:


  1. 右键单击存储库,然后选择 从上游获取

  2. 如果有新分支将不会显示在分支/远程跟踪下,您必须配置提取:

  1. Right-click the repository and choose Fetch from Upstream
  2. If the new branch will not shown up below Branches/Remote Tracking, you have to configure fetch:

  1. 右键单击提取节点在 Remotes / origin (远程/来源 )下面,然后选择 Configure Fetch ...

  2. Configure Fetch (确保提取)确保只有一个 Ref映射(假设远程命名为 origin + refs / heads / *:refs / remotes / origin / *

  1. Right-click the fetch node below Remotes/origin and choose Configure Fetch...
  2. In the Configure Fetch make sure there is only the single Ref mapping (assuming the remote is named origin) +refs/heads/*:refs/remotes/origin/*:


这篇关于如何获得一个新分支以显示在Eclipse Git远程跟踪中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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