可以在Git / Mercurial中安全地忽略哪些Eclipse项目.metadata? [英] What of Eclipse project .metadata can I safely ignore in Git/Mercurial?

查看:126
本文介绍了可以在Git / Mercurial中安全地忽略哪些Eclipse项目.metadata?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在包含多个Java项目的Eclipse工作空间中提供Eclipse RCP应用程序的代码。我们正在使用Mercurial与一个简单的.hgignore只是* .class(但同样的问题将涉及到Git)。



即使对代码的一个小的改变可以导致许多的.metadata中的文件变化。



我想从版本控制中排除部分或全部.metadata。如果我们完全排除它,工作空间就会丢失。



有谁知道我们可以安全地排除什么?或者,如果我们将代码下载到新的计算机,我们如何重新创建?

解决方案

我个人认为的文件的是:




  • version.ini(不是很令人兴奋)

  • .plugins / org.eclipse .jdt.core / variablesAndContainers.dat(classpath variables)

  • .plugins / org.eclipse.core.resources / .projects / * /。location(工作区中的项目)



在某处,我有一个Eclipse工作区用于测试一些相当严重的Eclipse相关工具,但可以工作。我会看看我是否可以挖出来。


We have the code for an Eclipse RCP application in an Eclipse workspace containing multiple Java projects. We are using Mercurial with a simple .hgignore just *.class (but the same issue would pertain to Git).

Even a small change to the code can result in many of the files in .metadata getting changed.

I'd like to exclude some or all of the .metadata from version control. If we exclude it completely, the workspace is lost.

Does anyone know what we can safely exclude? Alternatively, how can we recreate it if we pull the code down to a fresh computer?

解决方案

The files i'm personally aware of are:

  • version.ini (not very exciting)
  • .plugins/org.eclipse.jdt.core/variablesAndContainers.dat (classpath variables)
  • .plugins/org.eclipse.core.resources/.projects/*/.location (projects in the workspace)

Somewhere, i have an Eclipse workspace used for testing some Eclipse-related tools that is pretty severely cut down, but works. I'll see if i can dig it out.

这篇关于可以在Git / Mercurial中安全地忽略哪些Eclipse项目.metadata?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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