Typical .gitignore file for an Android app Typical .gitignore file for an Android app git git

Typical .gitignore file for an Android app


You can mix Android.gitignore:

# built application files*.apk*.ap_# files for the dex VM*.dex# Java class files*.class# generated filesbin/gen/# Local configuration file (sdk path, etc)local.properties

with Eclipse.gitignore:

*.pydevproject.project.metadatabin/**tmp/**tmp/**/**.tmp*.bak*.swp*~.niblocal.properties.classpath.settings/.loadpath# External tool builders.externalToolBuilders/# Locally stored "Eclipse launch configurations"*.launch# CDT-specific.cproject# PDT-specific.buildpath


In addition to what the others have suggested, I'd like to add the proguard folder, in case you are using it. You can either ignore the whole folder or just dump.txt, seeds.txt and usage.txt. Basically, it's a good idea to keep mapping.txt versioned, so that you can debug obfuscated stack traces from your users. More details here.


This is my standard Android .gitignore and .hgignore file. It usually works pretty well.

bingentarget.settings.classpath.project*.keystore*.swp*.orig*.log*.propertiesseed.txtmap.txt

It has eclipse, vim .swp files, mavens target folder and files for proguard mapping included.

Update: I have put my .gitignore for Android development online.