对Grails .gitignore的建议 [英] Suggestions for Grails .gitignore

查看:150
本文介绍了对Grails .gitignore的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我收集了以下内容:

 
* .iws
* .war
.classpath
.DS_Store
.project
.settings
/*.launch
/*.tmproj
/ out / **
stacktrace.log
test / reports

其他建议?

解决方案

更新5年后(2014年4月):

正如以下其他答案所述,现在两个网站可以提供良好的默认值。 gitignore文件,包括Grails项目。








,2009年1月)



只能添加 / web-app / WEB-INF 添加到您的列表中:这里是这样一个gitignore文件的完整示例

 #.gitignore for Grails 1.0.3 

#被 grails升级
#cf. GRAILS_HOME / scripts / Upgrade.groovy,目标(升级)
/ web-app / WEB-INF

#IDE支持被grails upgrade覆盖的文件
#cf 。 GRAILS_HOME / scripts / CreateApp.groovy,target(createIDESupportFiles)
#具体,你可以用你的项目名称替换下面的/ *,
#例如foobar.launch(无斜杠)
.classpath
.project
.settings
/*.launch
/*.tmproj

#logs
stacktrace.log
/ test / reports

#项目发布文件
* .war






请注意,由于在此提及,即:


  • build.xml 不是该列表的一部分,因为grails不会覆盖它。

  • eclipse点文件 .classpath .project 和<$如果它们存在,c $ c> .settings 也不会被覆盖,但它们可以被忽略。
  • 对于以前版本的Grail,
  • 需要(至少)一行 / plugins / core


So far i've collected the following:

*.iws
*.war
.classpath
.DS_Store
.project
.settings
/*.launch
/*.tmproj
/out/**
stacktrace.log
test/reports

Any other suggestions?

解决方案

Update 5 years later (April 2014):

As mentioned in the other answers below, two sites are now able to provide good default .gitignore files, including for a Grails project.


(Original answer, January 2009)

Only may be to add /web-app/WEB-INF to your list:here is an full example of such a gitignore file.

# .gitignore for Grails 1.0.3

# web application files that are overwritten by "grails upgrade"
#  cf. GRAILS_HOME/scripts/Upgrade.groovy, target( upgrade )
/web-app/WEB-INF

# IDE support files that are overwritten by "grails upgrade"
#  cf. GRAILS_HOME/scripts/CreateApp.groovy, target( createIDESupportFiles )
# to be specific, you could replace "/*" below with your project name,
#  e.g. "foobar.launch" (no slash)
.classpath
.project
.settings
/*.launch
/*.tmproj

# logs
stacktrace.log
/test/reports

# project release file
*.war


Note, as mentionned here, that :

  • build.xml is not part of that list, since grails won’t overwrite it.
  • the eclipse dot files .classpath, .project, and .settings will also not be overwritten if they exist, but they can be ignored at first.
  • for previous version of Grail, you would also have needed (at least) a line /plugins/core

这篇关于对Grails .gitignore的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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