I don\'t want any directory named build
or dist
to go into my SVN no matter how deep in the tree it is.
Is this possible? In git I just put
Create a file and add your ignores into it
ingore-list:
file1
directory1
file2
etc...
then apply the following command
for n in directory; do svn propset svn:ignore -F ignore-list $n; done
directory is name of your directory, you can sub categorize as well directory/sub-directory. Or use * to note current directory you are under.
This is assuming you are using bash as your shell
add to your ~/.subversion/config or /etc/subversion/config file:
[miscellany]
global-ignores = build dist
In subversion 1.8 over, it is possible to set global-ignores for current repository.
svn propset svn:global-ignores build .
svn propset svn:global-ignores dist .
Also you can create a folder named .svnignore, and write conditions.
build
dist
remember one condition per line, setting build/* or dist/debug is in vain. Then do the command:
svn propset svn:global-ignores -F .svnignore .
svn propset --recursive svn:ignore svn_ignore_rules .
where svn_ignore_rules is a file containing the ignore rules -- one per line
Of course you have to re-run it every time you add a new directory to your repo
svn_ignore_rules can also be considered to be checked into the repo, to be re-useable by other users having write access to the repo
One way would be to add some kind of check to either the pre- or post- commit hook but it's note straight forward if you don't own the repo server.
cd parent_dir #the directory containing folder to be ignored recursively svn propedit svn:ignore . #will open up svn-prop.tmp enlist folder(s) ^X Y commit -m 'ignore targeted direcoty'