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
As of subversion 1.8, there is now the svn:global-ignores
property which works like svn:ignore
but recursively (so set this on your top-level directory)
This works for me:
svn propset --recursive svn:ignore *.zip <dir_tree_with_no_zips>
In order to ignore all such files in all repositories, you could add a global-ignores
to your per-user configuration file.
On Unix-like systems, this area appears as a directory named .subversion in the user's home directory. On Win32 systems, Subversion creates a folder named Subversion, typically inside the Application Data area of the user's profile directory
See Configuration Options
Unfortunately, there's no per-repository option to do this. It's basically per-user, or per-directory, so the multiple svn:ignores
is probably the way to go, as annoying as it can be.
svn propset
takes --recursive
as an option, so you can do this, with two downsides:
svn:ignore
property whenever you add a new directoryFor example the folder structure:
Project/
Project/dist/
cd Project
svn propset svn:ignore '*' dist/
svn ci -m "content of dist ignored"
It's good to do a svn delete of dist content before the ignore command, so for branches dist will be empty.
Worked for me, tested today. Here is the page explaining it a bit
You first have to move to the top folder of your working copy and create a file there (say .svnignore) where you should place all the patterns that you want to be ignored, for example (for an Android project):
bin
gen
proguard
.classpath
.project
local.properties
Thumbs.db
*.apk
*.ap_
*.class
*.dex
Then you run the following command (remember that you must be at the top folder of your working copy):
svn propset svn:ignore -R -F .svnignore .
This will only work for folders and files that are not yet under version control. If you want a folder (or file) that is being versioned to start being ignored as well, remove it from version control by running the command:
svn rm --keep-local <path>
Got all this from this great article that explains it all: http://superchlorine.com/2013/08/getting-svn-to-ignore-files-and-directories/