zoukankan      html  css  js  c++  java
  • Java开发.gitignore文件包含.iml,.log的看法

    有一个开源项目https://github.com/github/gitignore 主要用来规范所有开发项目的.gitignore文件的编写,基本涵盖了所有的开发语言、开发环境等。今日我向JetBrains.gitignore提交了一个pull request,希望能在这个文件中增加.iml、.log两行代码的支持,引起了一场讨论。提交的pull request为:https://github.com/github/gitignore/pull/2418  。
          而JetBrains官方也对相关文件是否应该加到.gitignore中给出了意见,官方建议在此:https://intellij-support.jetbrains.com/hc/en-us/articles/206544839  。官方的一些解释如下:


    This 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 andtasks.xml files which store user specific settings
    .idea目录中除了workspace.xml和tasks.xml不需要在开发者之间共享,因为这两个文件保存了用户特定的信息。其他的都应该共享。所以workspace.xml和tasks.xml可以写到.gitignore中,其他的不要写到.gitignore中。

    All the .iml module files that can be located in different module directories(applies to IntelliJ IDEA)
    所有的.iml文件都应该共享,因为这些文件定位了不同的module目录。

    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、Maven的项目中的.iml文件,因为这些文件会在import的时候生成。


    gradle.xml file, see this discussion
    gradle.xml文件也不应该被分享。


    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/libraries目录下的XML文件也不应该分享,因为它们是由gradle、maven生成的。

    其实看了官方的关于.iml的说明,我还是不明白到底是否应该把.iml添加到.gitignore中,感觉官方的解释比较模糊。在有些评论中,开发者建议对于一些文件,可以设置一个local目录,在local目录中的文件是不需要被分享的。各位客官怎么看呢?
    ---------------------
    作者:乞力马扎罗的雪CYF
    来源:CSDN
    原文:https://blog.csdn.net/chenyufeng1991/article/details/78243849

    更多精彩干货详情可关注二维码回复“干货”即可获取

  • 相关阅读:
    【虎牙直播源】浏览器抓取真实直播源地址(纯前端JS解析源码)
    更加方便获取eid和fp的一种方式-通过HTML文件【京东飞天茅台1499抢购】
    一万字详解 Redis Cluster Gossip 协议
    一种离谱到极致的页面侧边栏效果探究
    人工智能能力提升指导总结
    超炫100套❤vue/react+echarts❤ 大屏可视化数据平台实战项目分享 (附源码)
    大厂Redis高并发场景设计,面试问的都在这!
    Vue 项目性能优化 —实战—面试
    函子的详细解析与发展历程
    B20J_2243_[SDOI2011]染色_树链剖分+线段树
  • 原文地址:https://www.cnblogs.com/xdclass/p/9835006.html
Copyright © 2011-2022 走看看