Programster's Blog

Tutorials focusing on Linux, programming, and open source

SVN - Global Ignores

SVN 1.8 introduces svn:global-ignores. This can be particularly useful if you want to make sure to exlcude/ignore certain things from your repository, but either don't know the exact path where they might appear or it is impractical to manually add the svn:ignore rules at each location. A perfect example of this is if you were to perform a composer update to install PHP packages, which may include any number of .git folders that you do not wish to include.

Steps

Navigate to the top of your project and use this command:

svn propedit svn:global-ignores .

Plug in the items you want to be ignored at all levels. For example, to exclude git code, you would just plug in:

.git

Notice that no wildcards are necessary. E.g. .git or .git/ etc.

References