31

How do I ignore all files within a folder under source control?

/project/published/ is a folder I want to keep

/project/published/some_file(s) are files/folders I don't want

More Details: Currently when I go to commit changes for my project I see a lot of files that I don't want to. They are files that get published to a folder and I don't need them under source control. I won't ever know the names of these files as they are chosen by users.

I tried to use the property svn:ignore with value published/* but that did not work. Any ideas?

kaya3
  • 47,440
  • 4
  • 68
  • 97

4 Answers4

56

You just right click on the published/ folder, select TortoiseSVN -> Properties, click New -> Advanced with the following:

  • Property name: svn:ignore
  • Property value: *

Then it would work fine.

Maccath
  • 3,936
  • 4
  • 28
  • 42
Shiro
  • 7,344
  • 8
  • 46
  • 80
12

I've found a solution. If I set the svn:ignore property directly on the folder I want to keep (published) and set it's value to * then it does what I want. I would have liked to add this property to the project root but this works too.

prop - svn:ignore

value - *

Thanks for the suggestions.

3

Perhaps this can help you: in the Commit dialog there's a check box to "Show unversioned files". It's not the same as telling Tortoise/SVN to ignore them but might just do the trick. HTH

FOR
  • 4,260
  • 2
  • 25
  • 36
  • 2
    I've been using that approach and it's been a hassle. If I have that unchecked I sometimes neglect to add new files to source. –  Nov 13 '08 at 23:20
2

I'm guessing you tried:

svn propset svn:ignore published/*

svn propset needs the value and target seperated:

svn propset svn:ignore [value] [target]

...so try:

svn propset svn:ignore "*" published

(Don't forget the quotes.)

Jonathan Lonowski
  • 121,453
  • 34
  • 200
  • 199
  • 1
    Your suggestion let me to apply the property directly to the folder as I wasn't using the command line to set the property but using TortoiseSVN's UI instead. –  Nov 13 '08 at 23:32