Skip to content

Instantly share code, notes, and snippets.

@iainconnor
Created January 24, 2014 20:20
Show Gist options
  • Select an option

  • Save iainconnor/8605514 to your computer and use it in GitHub Desktop.

Select an option

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
@parzibyte

Copy link
Copy Markdown

Thank you! :)

@alex-chaliy

Copy link
Copy Markdown

Клёво, клёво, клёво

@lewisevans

Copy link
Copy Markdown

You may want to add /captures and .externalNativeBuild also

@arkayapps

Copy link
Copy Markdown

Thanks.

@ABCsHub

ABCsHub commented Dec 30, 2017

Copy link
Copy Markdown

i are making a Operating System with linux. i will use these gitignore :) 👌

Gabriel Pereira

@lddatacom

Copy link
Copy Markdown

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.

@karimkod

karimkod commented Mar 2, 2018

Copy link
Copy Markdown

Thank you :D

@fari-99

fari-99 commented Apr 10, 2018

Copy link
Copy Markdown

thanks you so much

@s-badran

s-badran commented Aug 8, 2018

Copy link
Copy Markdown

thank you. I also think /*/build/ should be **/build/

@jackycaojiaqi

Copy link
Copy Markdown

thanks @salouri you save my time

@LuckyTeng

Copy link
Copy Markdown

thanks, this is really saving my time:)

@MarcinKulwicki

Copy link
Copy Markdown

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

@gauravsngarg

Copy link
Copy Markdown

Thanks for this post. it helped.

@vjayrajput

Copy link
Copy Markdown

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
Copy Markdown

Thanks, This helps

@sulemankhan447

Copy link
Copy Markdown

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
Copy Markdown

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

@CarlesRa

Copy link
Copy Markdown

Nice, thanks!!

@atembamanu

Copy link
Copy Markdown

Awesome, thanks

@vishudh

vishudh commented Mar 31, 2020

Copy link
Copy Markdown

Thank you

@Jazz4Dayz

Copy link
Copy Markdown

Is this up to date?

@bhapps

bhapps commented Jul 25, 2020

Copy link
Copy Markdown

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

@mnementh64

Copy link
Copy Markdown

👍

@R0land013

Copy link
Copy Markdown

Thank you

@hyperov

hyperov commented May 14, 2022

Copy link
Copy Markdown

amazing. thank you

@Kishangalgotra

Copy link
Copy Markdown

hi this file is not working for me

@Varzil

Varzil commented Sep 8, 2022

Copy link
Copy Markdown

Thanks. This works very well

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