Eric Eric - 28 days ago 10
Android Question

In Android development, what files should be committed to a repository?

Which files in an Android project should be committed to a version control repository? Which files should not be committed?

Right now my .gitignore file consists of the following lines:

# Android generated files #
###########################
android.keystore
local.properties
bin/
gen/
libs/
obj/

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db

# Eclipse generated files #
###########################
.settings/org.eclipse.jdt.core.prefs


Am I missing anything?

Answer

GitHub maintains an official list of recommended .gitignore files at this public repository.

For Android you can find it here

Or just copy/paste :

# Built application files
*.apk
*.ap_

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

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

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml