[英]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. /tmp
目录用于缓存等等,所以我希望在版本控制下有文件夹结构 ,但忽略每个目录中的所有文件 。
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? 我唯一的选择是在每个叶子上设置ignore *.*
,还是有办法忽略整个/tmp
子目录中的所有文件(以及只是文件)?
I believe that you'll have to add the entire structure when its empty, then set ignore to * on each leaf. 我相信你必须在空的时候添加整个结构,然后在每个叶子上设置ignore to *。
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. 我想,如果你的tmp文件夹中没有一个名字中有点,而你的所有文件都有点,那么设置一个忽略at / tmp for *.*
可能会有效。
I have just tested with Tortoise on Windows, added svn:ignore for * instead of . 我刚刚在Windows上测试了Tortoise,添加了svn:ignore for *而不是。 and it ignores now directories too :) 它现在也忽略了目录:)
So the solution would be to add property svn:ignore * on /tmp 所以解决方案是添加属性svn:ignore * on / tmp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.