TortoiseSVN - Ignoring files within a folder already in the repository
Asked Answered
M

4

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?

Metallist answered 13/11, 2008 at 20:34 Comment(0)
M
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.

Messapian answered 9/9, 2010 at 3:24 Comment(2)
On the latest TortoiseSVN you would have to go to TortoiseSVN -> Properties -> New... -> OtherThesis
What if you had multiple projects with the same structure and you wanted some_files(s) ignored in every one?Curie
M
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.

Metallist answered 13/11, 2008 at 23:30 Comment(0)
C
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

Colorimeter answered 13/11, 2008 at 20:37 Comment(1)
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.Quite
G
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.)

Gaillard answered 13/11, 2008 at 20:42 Comment(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.Quite

© 2022 - 2024 — McMap. All rights reserved.