General approach
As mentioned above, you should not store IDE files in VCS, you should save the IDN agnostic description of the project in VCS and generate IDE project files from it.
Java Maven Example
Save the pom.xml files to VCS and generate the Eclipse files by running mvn eclipse:eclipse
Grails example
The Grails project is described application.propertiesand grails-app/conf/BuildConfig.groovy. These files are present in every Grails application. You can generate Eclipse project descriptions from them by doing:
grails integrate-with --eclipse
This command also supports other tools such as IntelliJ and Textmate.
source
share