我应该保留我的项目文件版本控制? [英] Should I keep my project files under version control?

查看:101
本文介绍了我应该保留我的项目文件版本控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该保留像Eclipse的.project,.classpath,.settings这样的项目文件,在版本控制下(例如Subversion,GitHub,CVS,Mercurial等)?

解决方案

您希望保留版本控制任何便携式设置文件

意思是:

任何文件没有绝对的路径。

这包括:




  • .project,

  • .classpath(如果没有使用绝对路径,可以使用IDE变量或用户环境变量)

  • IDE设置(这是我不同意接受答案的地方)。这些设置通常包括静态代码分析规则,这对于将此项目加载到他/她的工作空间中的任何用户始终坚持执行至关重要。

  • IDE的具体设置建议必须写在一个大的README文件中(当然也可以版本)。



我的经验法则:

您必须能够将项目加载到工作区中,并将其中的所有内容妥善设置在IDE中,并在几分钟内完成。

没有额外的文档,维基页面读取或没有。

加载它,设置,去。


Should I keep project filesm like Eclipse's .project, .classpath, .settings, under version control (e.g. Subversion, GitHub, CVS, Mercurial, etc)?

解决方案

You do want to keep in version control any portable setting files,
meaning:
Any file which has no absolute path in it.
That includes:

  • .project,
  • .classpath (if no absolute path used, which is possible with the use of IDE variables, or user environment variables)
  • IDE settings (which is where i disagree strongly with the 'accepted' answer). Those settings often includes static code analysis rules which are vitally important to enforce consistently for any user loading this project into his/her workspace.
  • IDE specific settings recommandations must be written in a big README file (and versionned as well of course).

Rule of thumb for me:
You must be able to load a project into a workspace and have in it everything you need to properly set it up in your IDE and get going in minutes.
No additional documentation, wiki pages to read or what not.
Load it up, set it up, go.

这篇关于我应该保留我的项目文件版本控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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