gpt4 book ai didi

version-control - IntelliJ IDEA 9/10,要 checkin (或不 checkin )源代码管理的哪些文件夹?

转载 作者:行者123 更新时间:2023-12-03 04:39:55 26 4
gpt4 key购买 nike

我们的团队刚刚从 Netbeans 迁移到 IntelliJ 9 Ultimate,需要知道哪些文件/文件夹通常应从源代码管理中排除,因为它们不是“工作站可移植”,即:它们引用仅存在于一个用户计算机上的路径.

据我所知,IntelliJ 希望忽略大部分 .idea 项目,包括

.idea/artifacts/*
.idea/inspectionProfiles/*
.idea/copyright/*
.idea/dataSources.ids
.idea/dataSources.xml
.idea/workspace.xml

但是,它似乎想要 checkin 每个模块根目录中存在的 .iml 文件。

我最初通过命令行检查了整个 .idea 目录,这显然不知道 IDEA“应该”忽略什么。通常会忽略整个 .idea 目录吗?

最佳答案

我们有一个FAQ article涵盖这个问题。

[The .idea] format is used by all the recent IDE versions by default. Here is what you need to share:

  • All the files under .idea directory in the project root except the workspace.xml and tasks.xml files which store user specific settings
  • All the .iml module files that can be located in different module directories (applies to IntelliJ IDEA)

Be careful about sharing the following:

  • Android artifacts that produce a signed build (will contain keystore passwords)
  • In IDEA 13 and earlier dataSources.ids, datasources.xml can contain database passwords. IDEA 14 solves this problem.

You may consider not to share the following:

  • .iml files for the Gradle or Maven based projects, since these files will be generated on import
  • gradle.xml file, see this discussion
  • user dictionaries folder (to avoid conflicts if other developer has the same name)
  • XML files under .idea/libraries in case they are generated from Gradle or Maven project

.idea 目录是旧的 .ipr(Idea Project)文件的替代品,如果您想在用户之间共享项目,那么您需要共享 .idea 文件夹(除了提到的异常(exception)情况)在常见问题解答中)和所有 .iml 文件。

关于version-control - IntelliJ IDEA 9/10,要 checkin (或不 checkin )源代码管理的哪些文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3041154/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com