AndroidStudio SVN Ignored Files

来源:互联网 发布:nba2k14卢比奥面部数据 编辑:程序博客网 时间:2024/06/09 16:09

Android项目文件夹通常很大,几十到几百M,但我们再上传到SVN 或打包发给其他人时,并不需要把所有文件打包。这里说下AS下如何设置上传到SVN忽略一些文件。

需要在share到svn之前设置
1.File->Settings->Version Control->Ignored Files,3种方式添加忽略文件(指定文件,指定文件夹,匹配),通常忽略.gradle文件夹 .idea文件夹,项目和个moudle的build文件夹,local.properites文件,.iml文件。
Patterns

Two characters can be used as wildcards:

*: to replace any string.
?: to replace a single character.
For example, .iml will ignore all files with the iml extension; .?ml will ignore all files whose extension ends with ml.
这里写图片描述

2 VCS ->Import into Version Control ->Share Project(Subversion)。将项目分享到SVN上。

这里写图片描述
这里写图片描述
这里写图片描述
灰色就是忽略的文件,下一步可以svn commit,(右键Test文件夹,Subversion ->Commit Directory,或者工具栏vcs图标 )
这里写图片描述
可以看到要上传的文件中不包含忽略的文件。

打包项目文件夹时也可以忽略这些文件,大大减小项目文件大小。

原创粉丝点击