gitgithubsvnversion-controlsvn-checkout

How to clone a specific folder from remote repo without wasting data on .svn folder?


I wanted to fetch a very specific folder from a very huge remote repo[having size in several GBs], searching for the same i came to know about svn checkout but using it i found that the 800MBs of fetched data contains 300MBs of .svn folder which is currently of no use for me.

so, is there any way so that i can fetch a very specific folder without wasting my data and time on .svn folder ?

thank you in advance...


Solution

  • You could run the svn export command to download the data without the .svn directory. However, you cannot use the exported data to commit, update or diff it with other versions from the repository.

    Subversion stores metadata and the pristine versions of files in the .svn directory of a working copy. This allows you to perform offline version-control operations with the Subversion client (i.e., you can revert or diff files without contacting your server).

    Note that there is an ongoing work to make some parts of the .svn directory optional and therefore minimize its size (see ticket #525 and https://mail-archives.apache.org/mod_mbox/subversion-dev/202107.mbox/%3c874kcf6xin.fsf@red-bean.com%3e).

    Update #1:

    As Alvaro Gonzales noted (the comment is now deleted), you may want to consider sparse checkouts. I don't think that's what you are looking for, but check this thread Can you do a partial checkout with Subversion?.