❌ caches

Caches, as its name suggests, can be safely added to .gitignore .

I don’t see any good reason to keep it in VCS, but this folder is not added to .gitignore . Feel free to share if you see any good reason to keep it.

build_file_checksums.ser

Actually, this file is a serialization of an instance of ProjectBuildFilesChecksums .

This file is here to check if whether build.gradle , settings.gradle , local.properties , ~/.gradle/gradle.properties , gradle.properties , or the build.gradle files of your modules have changed.

It is that file that Android Studio uses to tell you that you need to sync gradle files.

✅ codeStyles

This folder contains the code style settings of the project. It may be useful to keep it if you change the default value.

For example, if you change the value of line break to force Linux line breaks (in order to avoid git issues with it), your files in it would look like:

Forces the use of

as line separator

Tells Android Studio that it is the project code style that should be used

✅ dictionaries

This folder contains the entry you have added to dictionary. This has to do with inspection of the code, and this dictionary may be important if you have strict rules in your continuous integration system.

❌ gradle.xml

I would definitively recommend to remove this file. It may contains the local path to your gradle version, and also contains the path to your module. You may for example develop a module in a separate repository, so the path to modules may also be specific to each user.

For all those reasons, I would definitively remove the gradle.xml file from VCS.

✅ inspectionProfiles

This folder contains your specific Lint rules for the project. Same as for dictionary folder, it should be kept in git.

❎ libraries

This directory contains file which indicates where the jar files of your libraries are stored. As the download path may be user specific, you should not keep this directory in your VCS.

✅ misc.xml

It contains information about the project, such as Java version, project type, and some others.

Those information are about the project, and are not user specific. So it should be kept in git.

❎ modules.xml

This file contains the path to your modules .iml file. Same as gradle.xml file, it should not be kept in git.

✅ navEditor.xml

This file stores the position of your elements in the Navigation Editor. If keeping this information is relevant for your project, you should keep this file. Otherwise, feel free to add it to .gitignore file in order to avoid conflicts with it.

✅ runConfigurations.xml

As it name may let you guess, this file stores the configurations you may add by clicking Edit Configurations. You definitively should keep this file in VCS.

✅ vcs.xml

This file contains informations about VCS you use in your project, to allow you using the GUI to perform versioning operations. You definitively should keep it in your project

❎ workspace.xml

This file contains information about your workspace on Android Studio, such as the last position of the cursor on a file you opened, … So it is definitely user specific information which should absolutely not be kept in git.

Summary

I would finally suggest you to add two lines only to the default .gitignore file which are:

As I said in the beginning of this story, I did not find any documentation about the content of the .idea folder, so this story may be incomplete and/or not 100% exact. Feel free to suggest anything in the comments, in order to improve this story.

If you liked this article, feel free to follow me on Twitter to get notified about next ones.