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?
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.
gitignore file is usually placed in the repository's root directory. However, you can create multiple . gitignore files in different subdirectories in your repository.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With