当前位置 博文首页 > nwsuafer的专栏:Android Studio下Svn忽略文件配置的几种方法
(一)新建项目的时候Android Studio向导会创建两个.gitignore,对应的,我们创建两个.svnignore就可以了。里面配置信息可以参考.gitignore,具体配置信息可以参考
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# built native files
*.o
*.so
# generated files
bin/
gen/
# Ignore gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Eclipse Metadata
.metadata/
# Mac OS X clutter
*.DS_Store
# Intellij IDEA (see https://intellij-support.jetbrains.com/entries/23393067)
.idea/workspace.xml
.idea/tasks.xml
.idea/datasources.xml
.idea/dataSources.ids
http://myshittycode.com/2013/12/02/intellij-configuring-svn-ignored-files/
Based on the example above, there are 5 things we need to ignore:-
epicapp-ear/target/
?directoryepicapp-war/target/
?directorytarget/
?directory.idea/
?directory*.iml
?filesSo, in IntelliJ…
.idea/workspace.xml
If you have quite a few files and directories to ignore, the above solution can be rather tedious.
So, an alternative solution is to “hack”?.idea/workspace.xml
?by entering all the ignored paths under “ChangeListManager” component:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<component name="ChangeListManager">
...
<ignored path="epicapp-war/target/" />
<ignored path="epicapp-ear/target/" />
<ignored path=".idea/" />
<ignored path=".settings/" />
<ignored path="target/" />
<ignored path=".DS_Store" />
<ignored path=".classpath" />
<ignored path=".project" />
<ignored mask="*.iws" />
<ignored mask="*~" />
<ignored mask="*.bak" />
<ignored mask="*.log" />
<ignored mask="*.iml" />
</component>
...
</project>
In this example, we ignore all?
target
?folders, all IntelliJ generated files, all Eclipse generated files, all OS-specific generated files and some useless files.cs