svn (subversion) ignore specific file types in all

2020-07-09 09:57发布

问题:

I have the following folder structure, and I would like for svn to ignore all eclipse files (.classpath and .project and .settings) in sub-projects

main-project/
  sub-1/.classpath
  sub-2/.classpath
  sub-3/part1/.classpath
  sub-3/part2/.classpath

Is there any way of configuring the .svn in the "main-project" to svn:ignore **/**.classpath?

So I dont have to edit it in every single sub-folder?

回答1:

I believe the answer I was looking for is:

vim ~/.subversion/config

scroll down to 'global-ignores':

global-ignores = *.classpath

The answer came from here:

How can I recursively configure svn status to hide ignored files?



回答2:

Use the --recursive (-R) flag on svn propset and set the svn:ignore so that it is applied recursively to every sub-folder:

svn propset svn:ignore -R <mask> <directory or . for current>

http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.propset.html



标签: svn