.hgignore file for Android Studio

By  | December 3, 2013 | Filed under: Software development

There are several Stack Overflow questions about this but none seems definitive. Github suggests https://github.com/github/gitignore/blob/master/Android.gitignore for general Android development, but that doesn’t take account of IDE files.

The developers of Android Studio give advice on IDE files to ignore at https://intellij-support.jetbrains.com/entries/23393067

I have ended up with:
#Android files - see https://github.com/github/gitignore/blob/master/Android.gitignore
# built application files
glob:*.apk
glob:*.ap_

# files for the dex VM
glob:*.dex

# Java class files
glob:*.class

# generated files
bin/
gen/

# Ignore gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

#Android Studio - see https://intellij-support.jetbrains.com/entries/23393067
.idea/workspace.xml
.idea/tasks.xml
.iws

#Android Studio put this in the sample .gitignore file
.DS_Store

Leave a Reply

Your email address will not be published. Required fields are marked *