Skip to content

Instantly share code, notes, and snippets.

@iainconnor
Created January 24, 2014 20:20
Show Gist options
  • Save iainconnor/8605514 to your computer and use it in GitHub Desktop.
Save iainconnor/8605514 to your computer and use it in GitHub Desktop.
A .gitignore for use in Android Studio
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
.gradle/
# Signing files
.signing/
# User-specific configurations
.idea/libraries/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
*.iml
# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
@jackycaojiaqi
Copy link

thanks @salouri you save my time

@LuckyTeng
Copy link

thanks, this is really saving my time:)

@MarcinKulwicki
Copy link

.gitignore you must create in root folder.
Change view from Android -> Project and in MyAppFolder create .gitignore.

@gauravsngarg
Copy link

Thanks for this post. it helped.

@vjayrajput
Copy link

Hi,

Not sure if there is something wrong but when I applied this gitignore file, all xml files in the project is ignored as well. Anyone got same issue or know how to solve it?

Thanks.

I am facing the same problem nowadays. Do you find a solution?

@avaiyakirtib
Copy link

Thanks, This helps

@sulemankhan447
Copy link

I know this sounds stupid but where do I put/find my .gitignore file in Android Studio? :(

In your root folder of Project

@Arman-Hosseini
Copy link

The iml pattern should be like this: /*/*.iml for every library

@CarlesRa
Copy link

Nice, thanks!!

@atembamanu
Copy link

Awesome, thanks

@vishudh
Copy link

vishudh commented Mar 31, 2020

Thank you

@Jazz4Dayz
Copy link

Is this up to date?

@bhapps
Copy link

bhapps commented Jul 25, 2020

I used git rm -r --cached ./
reset all committed files to start over with Git.

@mnementh64
Copy link

👍

@R0land013
Copy link

Thank you

@hyperov
Copy link

hyperov commented May 14, 2022

amazing. thank you

@Kishangalgotra
Copy link

hi this file is not working for me

@Varzil
Copy link

Varzil commented Sep 8, 2022

Thanks. This works very well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment