# What libgdx project files can I ignore from version control?

In an automatically created libgdx project, what files can I safely tell Git (or other revision control systems) to ignore?

I'm considering these:

*-android/.settings/
*-android/bin/
*-desktop/.settings/
*-desktop/bin/
*-html/.settings/
*-html/gwt-unitCache/
*-html/war/WEB-INF/classes/
*-html/war/WEB-INF/deploy/
*-html/war/assets/
*-html/war/
*/.settings/
*/bin/


Am I missing some? Is there a complete list somewhere?

• Generally, you want to put all what is needed to easily rebuild the project on your repository, whatever you are using SVN, GIT, Mercurial etc. A good practice is to avoid adding the result of compilation (e.g .class and .jar in your case). The sources and the different backend configurations should be enough. You could easily generalize your question (and ask it on the SO site) to any project using tools such as GIT, nothing specific to libGDX here. – nathan Dec 4 '12 at 8:23
• @nathan, I know the theory, but I use Eclipse I don't know what files can be generated and what are uniques in this case. – Zhen Dec 4 '12 at 8:47
• Maybe you can find some inspiration in this? – Laurent Couvidou Jan 31 '13 at 15:30

Ignore all the /bin/ directories (they contain files generated from sources). The /war/ directory hierarchy is similar (generated files for the GWT/HTML backend).

You can ignore the /.settings/ directories, as they contain Eclipse settings, and are not required to be able to re-build your application. (These are probably a bad idea to push into git if you expect to work with other developers, as they tend to have local paths in them.)

On the Android side, you should also leave out the gen directory

For the Eclipse .project and .classpath files see https://stackoverflow.com/questions/2818239/classpath-and-project-check-into-version-control-or-not (the answer there seems to be "yes, include them if using at least Eclipse v3.5").

The new project generator comes with autogenerated .gitignore file like:

## Java

*.class
*.war
*.ear
hs_err_pid*

## GWT
war/
html/war/gwt_bree/
html/gwt-unitCache/
.apt_generated/
html/war/WEB-INF/deploy/
html/war/WEB-INF/classes/
.gwt/
gwt-unitCache/
www-test/
.gwt-tmp/

## Android Studio and Intellij and Android in general
android/libs/armeabi/
android/libs/armeabi-v7a/
android/libs/x86/
android/gen/
.idea/
*.ipr
*.iws
*.iml
out/
com_crashlytics_export_strings.xml

## Eclipse
.classpath
.project
**/bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.externalToolBuilders/
*.launch

## NetBeans
**/nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml


• What about gradle/wrapper? – xjcl Sep 2 '20 at 13:44