To Git warehouse .idea study cited ------

1. What is .idea folder

      Because JetBrains IntelliJ IDEA is the first launch of the IDE (JetBrains initially called IntelliJ), and therefore the use of IDEA as the name of the configuration folder. According to guess the highest number of votes in the SO question answers, perhaps IntelliJ IDEA meaning of the name is composed of:

  • Intelli ===> Intelligent

  • J ===> Java

  • Idea ===>IDE that is Advanced or Idea just means idea( I have a good idea ...like this ) ...

    

2. Should the .idea submitted into the Git repository

       If you want other users to use the same IDE can be more convenient or specification of the project development, then put it submitted to the Git repository. For example, you can set the template file (.idea / fileTemplates), custom code style (.idea / codeStyleSettings.xml), the definition checker (.idea / inspectionProfiles /), so that other members of the development project can easily get started, it will than to write in the "Guide to the contribution of" binding stronger.

If you think Git repository should not contain files and projects unrelated to itself, then it may not be submitted to the Git repository.

 

3. Submit the correct method

       Of course, the entire catalog will be submitted to .idea behavior Git repository is not desirable. Because .idea file directory of the content contained privacy (such as changes in your file operations, user dictionary, the system environment variables, database passwords, etc.), or temporary files generated, these files no other project participants usefulness, and will reveal your privacy or affect the normal development.

If you choose to submit only Git repository .idea directory, you need to pay a little more than some of the work.

JetBrains accordance with official recommendations to the .idea file when using the VCS clip should be guided by the following principles:

     

1. Share the following documents:

Apart workspace.xml, usage.statistics.xml tasks.xml .idea and all files in the directory to which all may be positioned at different modules .iml directory module file (for IntelliJ IDEA)

2. cautious to share the following documents:

Android artifacts that produce a signed build, because they contain the keystore password (do not understand the first phrase, temporarily retain the original)

In IntelliJ IDEA dataSources.ids and datasources.xml file 13 and previous versions, which contain database password

3. Avoid sharing the following documents:

For projects using Gradle or Maven, to avoid sharing .iml and .idea / modules.xml files because they will generate gradle.xml files while importing

User dictionary (dictionaries folder)

.idea / XML files in the directory libraries, because they will generate from Gradle or Maven project

 

Recommended submitted

  • .idea/vcs.xml

  • .idea / fileTemplates /

  • .idea/inspectionProfiles/

  • .idea/scopes/

  • .idea / codeStyleSettings.xml

  • .idea/encodings.xml

  • .idea/copyright/

  • .idea/compiler.xml

to sum up

If you do not want to commit Git repository IDE-related configuration files, then you can ignore .idea folder; instead, you can also choose to have the files in the directory submission .idea into the Git repository. In other words, if the project contains .idea Git repository folders and development level of programmers and is not directly related. I do not feel committed or right.

 

Guess you like

Origin www.cnblogs.com/zhouyideboke/p/11641322.html