0

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...

Kunal Sharma
  • 416
  • 3
  • 12
  • 1
    @ÁlvaroGonzález if OP wants to download or check out only one particular directory from Subversion, he could just specify this directory's URL in the Subversion client. No need for sparse checkouts in this case. – bahrep Oct 30 '21 at 12:50
  • Are you using Git, or are you using Subversion? – torek Oct 30 '21 at 22:05
  • @torek initially i was using git but i came to know that what i want to do can be easily done with svn so i switched to it. `git` tag was just added so that it will become easier to find by some one who wants to do same but don't know about svn at that time. – Kunal Sharma Oct 31 '21 at 11:56
  • SVN has a very different model from Git: with Git, you clone an entire repository, and everyone has a clone. With SVN, you have one central SVN server, and you copy files from that server. Interfaces that tie a Git server to SVN extraction commands and vice versa must deal with this impedance mismatch: in your case it sounds like you are using an SVN client that can talk to a Git server by inserting its own SVN server that clones the entire repository. – torek Oct 31 '21 at 11:58
  • @torek I guess that OP uses GitHub and GitHub supports Subversion clients at some degree. – bahrep Oct 31 '21 at 16:10

1 Answers1

2

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?.

bahrep
  • 29,961
  • 12
  • 103
  • 150