5

I am working on a project using Android Studio, I am using GitHub and SourceTree also. The problem is when I make change in my project and open SourceTree then I see some files on Unstaged Files list like:

  • .idea/mics.xml
  • .idea/modules.xml
  • .idea/vcs.xml
  • ProjectName.iml
  • app/app.iml
  • app/build.gradle
  • setting.gradle

I don't know these files should be ignored or committed after changes in the code. Please suggest.

Here is the .gitignore file under app folder.

# 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
Ashish Tiwari
  • 2,168
  • 4
  • 30
  • 54

1 Answers1

4

Check out links below:

gitignore/JetBrains.gitignore at master · github/gitignore · GitHub - for Android Studio

gitignore/Android.gitignore at master · github/gitignore · GitHub - for Android itself

changhwan
  • 1,000
  • 8
  • 22
  • I have used your first link but still I am getting two .iml files, and still don't know which should be ignored and why? – Ashish Tiwari Jul 17 '15 at 12:25
  • 2
    Check if that files are already commited. ```.gitignore``` don't ignore files already tracked. Please check [http://stackoverflow.com/a/1139797/3451543](http://stackoverflow.com/a/1139797/3451543) – changhwan Jul 21 '15 at 02:52