SVN: Checkout/export only the directory structure

后端 未结 12 1286
花落未央
花落未央 2020-12-08 19:14

Is there a way to perform a SVN checkout (or export), which would fetch only the directory structure; that is to say, no files?

12条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 19:48

    I can't see that there is a way to do it from a brief look at svn help co. Something I've done before for updating a repository from a new version of a downloaded library (i.e. a vendor branch) is to delete everything which isn't an .svn folder:

    #!/bin/sh
    find ./ -type f | grep -v .svn | xargs rm -f
    

    It's not particularly efficient if you were trying to avoid having to check those files out in the first place, but it should have the same result.

提交回复
热议问题