[ACCEPTED]-How do you include/exclude a certain type of files under Subversion?-version-control
You're probably safest excluding particular 16 filetypes, rather than picking those you 15 want to include, as you could then add a 14 new type and not realize it wasn't versioned.
On 13 a per-directory basis, you can edit the 12 svn:ignore property.
svn propedit svn:ignore .
for each relevant directory 11 to bring up an editor with a list of patterns 10 to ignore.
Then put a pattern on each line 9 corresponding to the filetype you'd like 8 to ignore:
*.user *.exe *.dll
and what have you.
Alternatively, as 7 has been suggested, you can add those patterns 6 to the
global-ignores property in your ~/.subversion/config 5 file (or
"%APPDATA%\Subversion\config" on Windows - see Configuration Area Layout in the red bean book for more information). In that case, separate 4 the patterns with spaces. Here's mine.
# at 3 the beginning of the line introduces a comment. I've 2 ignored Ankh .Load files and all *.resharper.user 1 files:
### Set global-ignores to a set of whitespace-delimited globs ### which Subversion will ignore in its 'status' output, and ### while importing or adding files and directories. # global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store global-ignores = Ankh.Load *.resharper.user
This can be achieved using the svn:ignore property, or 9 the global-ignores property in your
~/.subversion/config file. (Scroll 8 to the top of that first link to see instructions 7 on editing properties.)
svn propset or
svn propedit on 6 a directory, you will be able to make Subversion 5 ignore all files matching that pattern within 4 the specific directory. If you change global-ignores 3 in
[miscellany] section, however, Subversion will 2 ignore such files no matter where they are 1 located.
See blog post svn:ignore.
I know using TortoiseSVN 7 that I can click on a root folder where 6 I have something checked out and can add 5 arbitrary properties by selecting the "Properties" menu 4 item. In this case you would just specify 3 file patterns to exclude.
The blog post for 2 command line stuff, but I'm sure it will 1 work fine with whatever client you're using.
At the lowest level, SVN allows you to ignore 5 certain files or patterns with svn:ignore attribute. VS 4 add-ins for SVN such as VisualSVN will automatically 3 ignore those files on your behalf. If you're 2 using TortoiseSVN, you can right-click files and folders 1 in Explorer and choose Add to Ignore List.
svn:ignore property, you can use wildcards.
Another way, when using TortoiseSVN, you 2 can select "Commit..." and then right click 1 on a file and move to changelist "ignore-on-commit".
If you use Eclipse (I use Spring Tool Suite):
Preferences > Team > Ignored Resources
click 2 on
Add Pattern, write .DS_Store (or whatever) and Save.
This 1 acts globally in your workspace.
More Related questions