提交Android studio时忽略文件

Mic*_*ico 5 svn android ignore commit android-studio

我把这行放在.gitignore中:

*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
Run Code Online (Sandbox Code Playgroud)

我设法在svn上导入我的项目而不包括这些文件.但是当我想提交时,基本的,所有文件都会被检查.为什么?

我想自动取消选中这些文件.

Doo*_*ght 6

如果您使用的是 SVN(不是 Git),那么您需要在不同的位置指定忽略文件/文件夹。

去:

File -> Settings

Version Control-> Ignored Files

并使用加号按钮添加它们,选择所需的文件夹/文件。

添加被忽略的文件

您选择的文件由您决定。以上是我选择的目录/文件。我认为应该排除的事情。

注意:确保您从正确的(当前)项目中选择文件夹/文件。因为它起初默认为我的另一个项目位置。