Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN Ignore all files (not the folders) in a subtree,

I have a folder structure like this:

/some_folder
/tmp
/tmp/foo
/tmp/foo/fu      *
/tmp/bar
/tmp/bar/bah     *
/tmp/bar/ba      *
/tmp/foobar      *
/more_folders

The /tmp directory is being used for caching and whatnot, so I want to have the folder structure under version control, but ignore all the files inside each directory.

Files will only exist in the leaf folders. That is, folders with no subfolders of their own: the starred ones in the above example.

Is my only option to set ignore *.* on each leaf, or is there a way to ignore all files (and just the files) in the entire /tmp subdirectory?

like image 510
nickf Avatar asked Sep 03 '09 04:09

nickf


People also ask

How do I ignore files in svn?

You can ignore a file or directory like . gitignore. Just create a text file of list of directories/files you want to ignore and run the code below: svn propset svn:ignore -F ignorelist.

Does Gitignore work for subfolders?

gitignore file is usually placed in the repository's root directory. However, you can create multiple . gitignore files in different subdirectories in your repository.

How do I ignore bin and obj folder in svn?

If you right click on a single unversioned file, and select the command TortoiseSVN → Add to Ignore List from the context menu, a submenu appears allowing you to select just that file, or all files with the same extension.


1 Answers

I believe that you'll have to add the entire structure when its empty, then set ignore to * on each leaf.

I suppose that, if none of your tmp folders have dots in their names and all of your files do have dots, that setting an ignore at /tmp for *.* might work.

like image 117
Doug Hays Avatar answered Oct 04 '22 10:10

Doug Hays