Eclipse + Git - 如何获取工具栏?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11699186/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse + Git - How to get toolbar?
提问by user1438003
I've got Eclipse 3.7.2 installed and working fine. I installed the git plugins (see below).
我已经安装了 Eclipse 3.7.2 并且工作正常。我安装了 git 插件(见下文)。
Right clicking my active project and clicking on "Team" gives me the options to pull/push/commit and more.
右键单击我的活动项目并单击“团队”为我提供了拉/推/提交等选项。
I have set my git executeable to msysgit (C git).
我已将我的 git 可执行文件设置为 msysgit (C git)。
The docs told me that to add git to the toolbar I should look in Window->Customize Perspective...
, but I couldn't anything related to git there, not even under the "Command Groups Availability" section.
文档告诉我要将 git 添加到工具栏,我应该查看Window->Customize Perspective...
,但我无法在那里找到与 git 相关的任何内容,甚至在“命令组可用性”部分下也不行。
How do I add push, pull & commit buttons to my Eclipse toolbar?
如何向 Eclipse 工具栏添加推送、拉取和提交按钮?
采纳答案by user1438003
Nothing worked and I had begun getting an unrelated error on startup with a troubleshooting step requiring reinstall.
没有任何效果,我开始在启动时遇到一个不相关的错误,并且需要重新安装故障排除步骤。
This time I downloaded Eclipse for Mobile Developers, and since then I have added my other packages and it's all working, but clicking the commit thing and clicking the arrow to merge my changes (with comment) results in nothing.
这次我下载了Eclipse for Mobile Developers,从那以后我添加了我的其他包并且一切正常,但是单击提交内容并单击箭头以合并我的更改(带注释)没有任何结果。
It isn't committed nor is an error given.
它没有提交,也没有给出错误。
回答by tpdi
Stumbled on this answer, but found this works:
偶然发现了这个答案,但发现它有效:
Install the Egit plugin, add the Git command group in Customize Perspective|Command Groups Availability, not the (pretty much useless) "Team", then check "Git" in Customize Perspective|Tool Bar Visibility
安装Egit插件,在Customize Perspective|Command Groups Availability中添加Git命令组,而不是(几乎没用的)“Team”,然后在Customize Perspective|Tool Bar Visibility中勾选“Git”
回答by Matthias Sohn
First install EGit from http://download.eclipse.org/egit/updates. Then you should find the Git command group and be able to activate it. msysgit isn't integrated with Eclipse.
首先从http://download.eclipse.org/egit/updates安装 EGit 。然后你应该找到 Git 命令组并能够激活它。msysgit 未与 Eclipse 集成。
See "Activating the Git toolbar"
请参阅“激活 Git 工具栏”
回答by CostelR
- install a fresh copy of eclipse with a new fresh workplace
- install egit
- show egit in toolbar (from customise perspective, etc....)
- copy
\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi
from the fresh installed workplace into your current workplace
- 使用新的新工作场所安装新的 eclipse 副本
- 安装 egit
- 在工具栏中显示 egit(从自定义角度等......)
\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi
从新安装的工作场所复制到您当前的工作场所
you'll loose some position settings of the layout, but most of the settings will be kept, and most important you'll have egit in toolbar in your current workplace.
您将丢失布局的一些位置设置,但大部分设置将被保留,最重要的是,您将在当前工作场所的工具栏中拥有 egit。
if you like you can analyse/diff the file workbench.xmi
and see what you have to set to get the toolbar; for me it was enough (most likely workplace was from previous versions of eclipse, and egit/eclipse does not update this xml file)
如果你愿意,你可以分析/比较文件workbench.xmi
,看看你必须设置什么才能获得工具栏;对我来说已经足够了(工作场所很可能来自先前版本的 eclipse,并且 egit/eclipse 不会更新此 xml 文件)