jetbran忽略idea目录
idea创建工程在git上忽略.iml文件和.idea目录?
解决
当操作git下的项目时,.iml文件和.idea目录下的有些文件会显示已被改动会出现在git待提交目录下,这里为了防止提交这些并不需要的东西,需要在idea中设置忽略这些东西.
1、file->editor->file-types->actionscript ;*.iml;.idea;
2、.gitignore插件
plugins->.ignore->.gitignore
*.iml
.idea
3.删除历史缓存
当使用.gitignore插件忽略文件时,该插件只会忽略未被git跟踪的文件,所以此时需要先在git中删除缓存
git rm -r --cached filePath
git commit -m "remove xx"
或者:
git rm -r --cached .
git add .
git commit -m “update .gitignore”
.gitignore只能忽略未被git跟踪的文件,所以如果忽略未生效得先在忽略之前删除git本地缓存