Add any files in a folder to Subversion ignore list without adding that folder

5,402

If the folder actually is already in SVN, then you just need to specify the svn:ignore property on that folder to ignore anything you like. In this case, you want to ignore everything, so you need to set the value to *. This is a wildcard that will match any file.

In TortoiseSVN, right-click the folder and choose TortoiseSVN→Properties... From there, click the "New" button to add a property. You should be able to find "svn:ignore" in a drop-down list, but recent versions put it in an "advanced" menu somewhere, I don't have SVN on this computer to check right now. Once you get the property editor dialog up, just enter the single character '*' in the edit box and save the property.

If you prefer the command-line, then depending on your shell, something as simple as svn propset svn:externals "*" YourDirectoryName will probably work. Some shells may need some extra escaping.

Either way, when you are done setting the property, you will need to commit to make the ignore list permanent (and shared with others). Now when you commit or check for modifications, you won't normally see any of the files in that folder.

Share:
5,402

Related videos on Youtube

Hikari
Author by

Hikari

Updated on September 18, 2022

Comments

  • Hikari
    Hikari over 1 year

    I wanna keep a folder in Subversion repo, but add any file inside it to ignore list.

    I wanna do it because that folder stores temporary files used while the app is running. I want the folder in Subversion so that, when I checkout, that folder will be created. But I want Subversion client (tortoise) to ignore any file that may be inside it.

    Is it possible to do that?

    • Ben
      Ben almost 10 years
      If your folder is created on checkout, the folder is already added. Why does you question specify "without adding that folder"?