如何在 Android Studio 项目中 .gitignore app/app.iml?
How to .gitignore app/app.iml in Android Studio project?
无论我如何构建我的 .gitignore,我似乎都无法通过 Android Studio 2.0.0.
忽略 app/app.iml
到目前为止,我已经尝试根据 github 的标准 Android Studio .gitignore 模板忽略所有 *.iml 文件,并直接将文件作为目标..
app/app.iml
*.iml
有人 运行 遇到与此特定文件或其他 *.iml 文件类似的问题吗?你是怎么解决的?
我认为你所做的应该有效。尝试安装 .ignore 插件,右键单击该文件 app.iml,有一个 "Add to ignore file"。
如果文件在 git忽略更新之前已经提交,它将继续被 git 跟踪。
尝试执行 git rm --cached app/app.iml
并在之后进行另一次提交删除文件。
尝试在您的 .gitignore 中向 app/app.iml
添加正斜杠,就像这样...... /app/app.iml
。在遵循@xiaoyaoworm 的建议后,这对我有用。
试试这些步骤:
- 删除缓存的 iml 文件,使用:
git rm --cached <all_your_iml_files>
- 在
.gitignore
文件中添加 *.iml
并再次提交。
之后将不会跟踪 iml 文件。
无论我如何构建我的 .gitignore,我似乎都无法通过 Android Studio 2.0.0.
忽略 app/app.iml到目前为止,我已经尝试根据 github 的标准 Android Studio .gitignore 模板忽略所有 *.iml 文件,并直接将文件作为目标..
app/app.iml
*.iml
有人 运行 遇到与此特定文件或其他 *.iml 文件类似的问题吗?你是怎么解决的?
我认为你所做的应该有效。尝试安装 .ignore 插件,右键单击该文件 app.iml,有一个 "Add to ignore file"。
如果文件在 git忽略更新之前已经提交,它将继续被 git 跟踪。
尝试执行 git rm --cached app/app.iml
并在之后进行另一次提交删除文件。
尝试在您的 .gitignore 中向 app/app.iml
添加正斜杠,就像这样...... /app/app.iml
。在遵循@xiaoyaoworm 的建议后,这对我有用。
试试这些步骤:
- 删除缓存的 iml 文件,使用:
git rm --cached <all_your_iml_files>
- 在
.gitignore
文件中添加*.iml
并再次提交。
之后将不会跟踪 iml 文件。