I'm using SVN as my VCS. I have a folder where I keep user-uploaded files. Obviously I don't need those under version control. However, there is a single file in the folder, which I need - .htaccess.
It's already under version control, but how do I specify开发者_StackOverflow that I need all other files besides .htaccess ignored in that folder?
I've come across this article: ThoughtsPark.org: Using negative patterns for Subversion's svn:ignore property, but the approach given is kind of cryptic to me and I'm not able to get it working.
Thanks in advance!
Subversion will not apply the patterns in svn:ignore
to already versioned files. So in your example the pattern *
should be OK. Just ignore everything unversioned.
The idea is that you make a file pattern which matches all files, except .htaccess. In the article, they use character classes to make such a pattern.
E.g.
[^a]*
Matches any file which first letter is not an a. This won't work if you specify the full .htaccess filename like this, but the following may work for you:
[^.]*
This will ignore any file not starting with a dot.
精彩评论