fresskoma Asked: 2009-08-01 03:15:52 +0800 CST2009-08-01 03:15:52 +0800 CST 2009-08-01 03:15:52 +0800 CST Add directory structure to SVN, without files 772 Is there a way to add a directory structure to an SVN repository without adding the files contained in the folders? svn directory 3 Answers Voted Best Answer fresskoma 2009-08-01T03:19:24+08:002009-08-01T03:19:24+08:00 So sorry, I should've RTFM ... http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.add.html You can add a directory without adding its contents: $ svn add --depth=empty otherdir A otherdir Edit: This doesn't work recursively though, is there any way to do that too? Kyle Brandt 2009-08-01T03:54:14+08:002009-08-01T03:54:14+08:00 If you want to do it recursively, maybe this will work for you? find . -type d ! -name '.' ! -path "*.svn*" -print0 | xargs -0 svn add --depth=empty doctorlove 2019-03-15T01:49:54+08:002019-03-15T01:49:54+08:00 Late to the party, but svn add --non-recursive works non-recusively.
So sorry, I should've RTFM ...
http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.add.html
You can add a directory without adding its contents:
Edit: This doesn't work recursively though, is there any way to do that too?
If you want to do it recursively, maybe this will work for you?
Late to the party, but
works non-recusively.