Android studio - should the entire .idea directory be in git ignore?

后端 未结 3 988
遇见更好的自我
遇见更好的自我 2020-12-22 18:25

I saw a lot of examples for .gitignore files for AndroidStudio, some have .idea in them, and some don\'t.

Is there a good

3条回答
  •  忘掉有多难
    2020-12-22 19:06

    OK, so after some "Yes" and "No" answers, I am adding a "Yes and no" answer :)

    The problem is that .idea is used for both project build configuration (dependencies declaration) and project settings (inspections, etc.).

    You definitely don't want to use your IDE for your build configuration, but you might want to share the settings among the team. That's why you need to ignore only a part of the .idea content (like the libraries folder and the modules.xml file), but keep others in the version control (e.g. the copyright, dictionaries and inspectionProfiles folders and files under .idea like dynamic.xml, codeStyleSettings.xml, etc.).

提交回复
热议问题