Ignore tmp folder in Subversion
Whenever I create a new Ruby on Rails project, I tell SVN to ignore some folders, such as log. I开发者_开发问答t's simple to do, with these commands:
svn remove log/*
svn propset svn:ignore "*" log/
Another folder which shoud obviously not make it to SVN is tmp. So, I always try to do the same operations on it but SVN doesn't seem to ignore it... It sends me those messages in order when I execute the previous commands:
svn: 'tmp' is not a working copy
svn: warning: 'tmp' is not under version control
Seems fine to me... the problem is that the "svn status" commands still output this:
? tmp
How can I get rid of this question mark?
Add the tmp
directory name to the svn:ignore property for the parent directory:
svn propset svn:ignore tmp .
Note that the svn:ignore
property is a multiline list of file patterns to ignore, so it's usually better to edit it with svn propedit
:
svn propedit svn:ignore .
Using svn propset
will completely overwrite whatever else you had in that property when setting the new value.
精彩评论