What should be in my .gitignore for an Android Studio project?

后端 未结 30 3343
星月不相逢
星月不相逢 2020-11-22 04:23

What files should be in my .gitignore for an Android Studio project?

I\'ve seen several examples that all include .iml but IntelliJ docs sa

30条回答
  •  终归单人心
    2020-11-22 04:49

    Depends on how your project format is maintained:

    You have two options:

    1. Directory-based format (You will have a .idea folder which contains the project specific files)
    2. File-based format (configuration files are .iws and .ipr)

    Ref: http://www.jetbrains.com/idea/webhelp/project.html

    Files committed to version control depends on the above:

    1. Include .idea folder to version control, exclude workspace.xml and tasks.xml
    2. Version control .ipr file and all the .iml module files, exclude the .iws file as it stores user specific settings.

    Ref: https://intellij-support.jetbrains.com/entries/23393067

提交回复
热议问题