Should I ignore the .idea folder when using PyCharm with Git?(将 PyCharm 与 Git 一起使用时,我应该忽略 .idea 文件夹吗?)
问题描述
我阅读了 PyCharm 中的 Git 集成,并从 PyCharm 创建了一个 Git 存储库.我在 PyCharm 中这样做是因为我希望 PyCharm 知道是否应该忽略 .idea 文件夹,如果是这种情况,它会自动创建一个 .gitignore 文件.idea/ 行.
I read about Git integration in PyCharm, and created a Git repository from PyCharm. I did this in PyCharm because I was hoping PyCharm would know whether the .idea folder should be ignored, and if that's the case, it would automatically create a .gitignore file with the line .idea/ in it.
但它没有,所以我认为我不应该忽略 .idea 文件夹.但是,我快速搜索并找到了某人的示例 .gitignore 文件,here,它显然忽略了 .idea 文件夹.
But it didn't, so I assumed that I shouldn't ignore the .idea foler. However, I did a quick search and found someone's example .gitignore file, here, which clearly ignores the .idea folder.
所以,我的问题是,.idea 文件夹是否应该被忽略?
So, my question is, should the .idea folder be ignored or not?
推荐答案
忽略整个 .idea 文件夹不一定是最好的主意.这里有很多类似的讨论.
Ignoring the whole .idea folder is not necessarily the best idea. There's a number of similar discussions here about this.
- 如何处理Git 源代码控制下的 IntelliJ IDEA 项目文件不断变化?
- Intellij Idea 9/10,哪些文件夹要签入(或不签入)源代码管理?
- 是否应将 .idea 文件夹置于源代码控制之下?
但我建议您查看官方常见问题解答.
这篇关于将 PyCharm 与 Git 一起使用时,我应该忽略 .idea 文件夹吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 PyCharm 与 Git 一起使用时,我应该忽略 .idea 文
基础教程推荐
- 尝试制作WhatsApp机器人 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
