tags:

views:

831

answers:

2

So far i've collected the following:

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

Any other suggestions?

+3  A: 

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
VonC
+3  A: 

IMHO, stuff like .DS_Store and *.tmproj should not be in the projects .gitignore, but rather in your own userwide ignore-file, as they aren't related to the project but just related to how you work in the repository.

Otherwise, an argument could be made to also include ignores for temporary files from Eclipse, vim, emacs, XCode, ...

Pieter