Reputation: 2502
I am using Tortoise SVN 1.6.16 in Windows 7. If I have a certain file type I want to exclude from future commits, I thought I could just go find a file of that type within my working folder, then right click it, and select "TortoiseSVN->Delete and Add to Ignore List->*.ext" where ext is the file extension of the file I clicked, as shown in the image below.
However, when I do this, it only excludes that specific file, and the next time I commit, all other files of that type still come up in the list to commit.
Am I doing something wrong? How can I just tell Tortoise or SVN to ignore all files of a certain type from future commits?
Upvotes: 9
Views: 8639
Reputation: 507
You could also use Tortoise's global ignore pattern (if it's applicable to all your working copies):
Upvotes: 2
Reputation: 36708
I had the same hunch as @Stefan: that you were probably seeing files in subdirectories and thinking those should have also been ignored even though you only applied the ignore to a single folder.
So if that is in fact the case, here is the recipe:
When you want to ignore files or patterns from a single directory:
Use the convenience menu command to add to the ignore list.
When you want to ignore files or patterns from a subtree:
Open the subversion properties (TortoiseSVN >> Properties
) of the root of the subtree. Add or edit an entry for the svn:ignore
keyword. The illustration shows an example where I have specified to ignore an obj
subfolder as well as all files with a .user
or .bak
extension.
The secret, though, is in the specification--when you define the patterns to ignore, select the recursive choice as indicated here:
Unfortunately, there is one catch to this method: In my example, I had previously specified to ignore obj
and *.user
and I was adding just the *.bak
pattern. When I apply recursively, it does not apply just the change (*.bak) but everything in the svn:ignore keyword (obj, *.user, and *.bak) to all subfolders. That may or may not be what you want, so be aware of it.
Upvotes: 16
Reputation: 43575
It ignores all bat files right, but not recursively! It only ignores them in the folder you added it to the ignore list.
Upvotes: 2