Search code examples
javaandroideclipsegitgitignore

Typical .gitignore file for an Android app


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


Solution

  • 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