从Eclipse工作区.metadata进行登录 [英] What to check-in from an Eclipse workspace .metadata

查看:190
本文介绍了从Eclipse工作区.metadata进行登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在版本控制我的工作区下的项目,但从来没有发生过,我应该检查工作区配置本身。



到目前为止/ p>

我知道我永远不会对 .log 文件感到兴趣,所以我绝对不会检查它,但...我可以丢弃其他其他子目录或文件?应该检查 .lock (大小0)吗?

解决方案

简短的答案:不要将.metadata添加到VCS。



长回答:



执行版本控制有两个一般原因稍微简化一下):


  1. 与其他开发者分享您的项目

  2. 以确保您有备份,以防您的硬盘驱动器kaput

如果您使用版本控制的第一个原因,那么在应该进行版本控制的.metadata目录。这是因为有关您的机器的信息是特定的,如果其他机器试图使用这些信息,会出现问题。



在您使用版本控制的第二个原因,那么我仍然建议对元数据进行版本控制(尽管稍微不太强)。 .metadata中的大部分信息都是二进制的,或至少非常无趣的阅读。所以,你不需要返回版本,做任何diffs或任何类似的。相反,我建议只要使用适当的备份服务,在紧急情况下备份整个电脑。


I have been version-controlling the projects under my workspace but it never occurred to me that I should be checking in the workspace configuration itself.

Until now.

I know that I have absolutely no interest in the perpetually bloating .log file, so I am definitely not going to check it in, but... can I discard other other subdirectories or files? Should the .lock (size 0) be checked it? What about the .plugins subdirectory?

解决方案

Short answer: do not add .metadata to VCS.

Long answer:

There are two general reasons to do version control (this is a slight over simplification):

  1. to share your projects with other developers
  2. to ensure that you have backups in case your hard drive goes kaput

If you are using version control for the first reason, then there is nothing in the .metadata directory that should be versioned. This is because the information there is specific to your machine and would mess things up if other machines tried to use it.

In you are using version control for the second reason, then I would still recommend against versioning the metadata (although slightly less strongly). Much of the information in the .metadata is binary, or at least extremely uninteresting to read. So, you will not need to go back versions, do any diffs, or anything like that. Instead, I'd recommend just using a proper backup service that backs up your entire computer in case of an emergency.

这篇关于从Eclipse工作区.metadata进行登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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