是否必须在版本控制中保存 *.iml 文件? [英] Is it mandatory to save *.iml files in Version control?

查看:37
本文介绍了是否必须在版本控制中保存 *.iml 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在已经切换到 Android Studio 并使用 Source Tree 在 Git 中保存我的项目.每当我从我的模块中添加或删除任何库时,它的 .iml 文件也会发生变化.如果我提交 *.iml 真的无关紧要,因为它们是在其他 Android Studio 中自动生成的.但是,这里 它说你应该存储 *.iml .我的问题是,我们真的需要与他人分享我们的 *.iml 吗?如果是,为什么?

I have now switched to Android Studio and saving my projects in Git with Source Tree. Whenever I add or remove any library from my module, its .iml file also changes. It really doesn't matter if I commit the *.iml because they get auto-generated in others Android Studio. However, here it says you should store *.iml . My question is, do we really need to share our *.iml with others? If yes, why?

推荐答案

一般最佳实践是:

  • 使项目尽可能与 IDE 无关,
  • 不要提交生成的文件.

所以答案是:最好让 VCS 忽略此类文件.

So the answer is: it's better to make such files ignored for VCS.

这篇关于是否必须在版本控制中保存 *.iml 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆