对 Grails .gitignore 的建议 [英] Suggestions for Grails .gitignore
问题描述
到目前为止,我收集了以下内容:
<前>*.iws*.战争.classpath.DS_Store.项目.设置/*.发射/*.tmproj/出去/**堆栈跟踪日志测试/报告还有其他建议吗?
5 年后更新(2014 年 4 月):
如下面的其他答案所述,两个站点现在能够提供良好的默认 .gitignore 文件,包括用于 Grails 项目.
GitHub,在创建新存储库时(基于 github/gitignore 项目).
=>Grails.gitignore
(原答案,2009 年 1 月)
可能只是将 /web-app/WEB-INF
添加到您的列表中:这里是 此类 gitignore 文件的完整示例.
# .gitignore 用于 Grails 1.0.3# 被grails 升级"覆盖的 Web 应用程序文件#参见GRAILS_HOME/scripts/Upgrade.groovy,目标(升级)/web-app/WEB-INF# IDE 支持被grails 升级"覆盖的文件#参见GRAILS_HOME/scripts/CreateApp.groovy,目标(createIDESupportFiles)# 具体来说,您可以将下面的/*"替换为您的项目名称,# 例如foobar.launch"(无斜杠).classpath.项目.设置/*.发射/*.tmproj# 日志堆栈跟踪日志/测试/报告# 项目发布文件*.战争
<小时>
注意,正如此处提到的,:
build.xml
不是该列表的一部分,因为 grails 不会覆盖它.- eclipse 点文件
.classpath
、.project
和.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.
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屋!