SVN ignores

在windows下面用SVN 用命令行不是很方便,dos很烦的,所以一般都会用tourist svn

mac下牛人都喜欢直接敲命令行,比如svn co http:// 等等。。

不过为了看得清楚,有必要也搞个可视化工具,比如Cornerstone

Cornerstone里面也有自己的ignore配置,如果不勾选使用全局ignore的话,是不会读取

~/.subversion/config

配置文件的,它自己的配置在Preferences > Subversion > General > Global Ignores

想避免不同的ignore文件造成的不一致,可以在finder中直接看隐藏的目录直接去编辑 ~/.subversion/config

$ defaults write com.apple.finder AppleShowAllFiles -bool true

但是两处地方config都设了,还是无法ignore某个拖下来了的文件是为什么呢?

找了一圈终于找到一段话(出处链接找不到了):

Ignored Files

By default, all files in a working copy are expected to be placed under version control. As a result, all unversioned files (i.e. those not yet placed under version control by being added to the working copy) are displayed with a special status which is designed to attract your attention.

However you may not want to place some files under version control at all. Typically, such files include the products of build processes such as object files emitted by compilers and executables created by linkers.

By default, these files will be continuously brought to your attention by being marked as unversioned. This is distracting and makes it more difficult to isolate the interesting changes made to your working copy.

The solution is to tell Cornerstone that you want to ignore these items. As a result the items are not displayed by default in the working copy.
Cornerstone can only ignore unversioned files. Once a file has been added to a working copy it can no longer be ignored.
Global Ignore List

The global ignore list is a Subversion option which defines files and file types that should automatically be ignored. The list can contain both filenames such as .DS_Store and patterns (or globs) such as *.o and *.pbxuser.

Files and folders which match items in this list will automatically be ignored when encountered in a working copy.

The global ignore list can be edited in the Subversion section of Cornerstone's preferences window.

The global ignore list is a global preference which will affect all Subversion applications.

上面框里的黑字表示,只有没有进入版本的文件才能奏效。。。

所以要想无视某些目录的文件,只有先建repository后,不要下载某些目录,这样working copy中就不会有多余的东西了!

所谓ignore只有自己独有的尚未提交的文件才有效。

原文地址:https://www.cnblogs.com/haimingpro/p/4962007.html