Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

In libgdx auto created project, What files can I ignore on Git (or another revision control system)?

E.g Should I ignore:

*-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/
share|improve this question
    
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
add comment

2 Answers

up vote 6 down vote accepted

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 http://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").

share|improve this answer
add comment

You can have separate .gitignore files for each folder. So you can put a specific Android .gitignore on the Android project and so on. Without worrying about libgdx in general.

Github has good pre-made templates for Android and GWT (which libgdx uses for the web version). You could just use those and place each on their specific directory.

List of templates: https://github.com/github/gitignore

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.