Typical .gitignore file for an Android app

eric picture eric · Dec 12, 2011 · Viewed 48.5k times · Source

Just put an Android project under git (beanstalk) version control via the command line (mac terminal). Next step is to set up exclusions.

To those of you who have already been down this path:

What should a typical .gitignore file look like for an android project?

Project set up in Eclipse

Answer

jamapag picture jamapag · Dec 12, 2011

You can mix Android.gitignore:

# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/

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

with Eclipse.gitignore:

*.pydevproject
.project
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath