对Grails .gitignore的建议 [英] Suggestions for Grails .gitignore
问题描述
* .iws
* .war
.classpath
.DS_Store
.project
.settings
/*.launch
/*.tmproj
/ out / **
stacktrace.log
test / reports
其他建议?
更新5年后(2014年4月):
正如以下其他答案所述,现在两个网站可以提供良好的默认值。 gitignore文件,包括Grails项目。
-
GitHub在创建新回购库时(基于 github / gitignore project )。
=>Grails.gitignore
,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不会覆盖它。
.classpath
, .project
和<$如果它们存在,c $ c> .settings 也不会被覆盖,但它们可以被忽略。
/ 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.
GitHub, when creating a new repo (based on the github/gitignore project).
=>Grails.gitignore
(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屋!