0

For example suppose I have a directory 'project' but I want to ignore anything matching the following wildcard '*.jpg' when I add the directory. How can I do this?

Edit: To clarify I'm running into a chicken and egg problem. I can't ignore files before I have added a directory to version control. However once I add the directory it adds automatically the files I wish to ignore.

Hoa
  • 19,004
  • 26
  • 72
  • 102
  • 2
    possible duplicate of [How do I ignore files in subversion?](http://stackoverflow.com/questions/86049/how-do-i-ignore-files-in-subversion) – John Carter May 07 '12 at 01:56

2 Answers2

2

Look at the Subversion configuration file. On Unix/Mac/Linux systems, it's $HOME/.subversion/config. In Windows, it can be different places. Normally it's in %USERPROFILE%\.subversion\config, but I can't vouch for it on every system. Some Subversion client might put it in the registry.

In the Subversion configuration file, there's a section [miscellany]. A few lines down, there's a global-ignores entry. Any file that matches the glob patterns won't be added by a recursive svn add or an svn add with a file globbing pattern instead of a specific file name. Also, any non-added file that matches the globbing pattern won't show up when you do an svn status by default.

See this section in the Subversion online manual. Take a look about the global-ignores.

David W.
  • 102,141
  • 38
  • 210
  • 325
1

You need to edit the svn:ignore property

> svn pe . svn:ignore

This should open up your default text editor. Add the following:-

*.jpg

Then save and commit.

See documentation for more details.

Martin
  • 6,869
  • 3
  • 27
  • 43