zl程序教程

您现在的位置是:首页 >  工具

当前栏目

IntelliJ IDEA 的 .idea 目录加入.gitignore无效的解决方法

IDEA方法 解决 目录 Intellij 加入 无效 gitignore
2023-09-14 08:56:58 时间

[转载]

无效的原因是:对应的目录或者文件已经被git跟踪,此时再加入.gitignore后就无效了,

解决办法:

先执行

[文件夹]  git rm -r --cached .idea

[文件]     git rm --cached demo-project.iml

再重新加入.gitignore文件

 

解决方法来源:http://stackoverflow.com/questions/9550437/how-to-make-git-ignore-idea-files-created-by-rubymine