简体   繁体   English

Eclipse + Git - 如何在与选项进行比较时仅显示已修改的文件?

[英]Eclipse + Git - How to show only modified files in compare with option?

I'm trying to compare my project with a previous commit on git. 我试图将我的项目与之前的git提交进行比较。 Eclipse shows in the Git Tree Compare window every single file of the project, is there a way to show just the modified files? Eclipse在Git Tree Compare窗口中显示项目的每个文件,有没有办法只显示修改后的文件?

I'm using Eclipse Juno + EGit 2.0 我正在使用Eclipse Juno + EGit 2.0

Try the (Right click) Team-> Synchronize Workspace. 尝试(右键单击)Team-> Synchronize Workspace。 You need to select a project for this menu item to show up. 您需要选择要显示此菜单项的项目。 This should open the Synchronize Perspective. 这应该打开Synchronize Perspective。 There are some 'modes' you can choose like only show incoming, or outgoing, etc... 您可以选择一些“模式”,例如只显示传入或传出等...

I find this view a bit better than the 'compare with'. 我觉得这个观点比'与'比较好一点。 Not sure why EGit has both. 不确定为什么EGit都有。

If you select two commits in the history view and use the context menu "Compare with each other", then you get a diff with only modified files. 如果在历史记录视图中选择两个提交并使用上下文菜单“相互比较”,那么您将获得仅包含已修改文件的差异。 For your use case, one of the two commits must be the uppermost. 对于您的用例,两个提交中的一个必须是最重要的。

However, this includes all projects in the workspace, so it might give you some noise, if you had changes between the 2 commits in other projects than the one to investigate. 但是,这包括工作区中的所有项目,因此如果您在其他项目中的2次提交之间进行了更改,则可能会给您一些噪音。

This is an old thread, but nothing has changed. 这是一个旧线程,但没有任何改变。 egit doesnt do the job for multi-project development, in terms of presenting a focused delta between file hierarchies, branches, commits, change sets, what have you. 对于多项目开发而言,在文件层次结构,分支,提交,变更集以及您拥有的内容之间呈现集中的增量方面并不起作用。 I use beyond compare software, which is low-cost, but not free, to get the required view (provided at job-site). 我使用超越比较软件,这是低成本但不是免费的,以获得所需的视图(在工作现场提供)。 If anyone knows of an o/s tool or eclipse plug-in which handles this task well, please chime in. 如果有人知道一个o / s工具或eclipse插件可以很好地处理这个任务,请插入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM