27

How can I download single file from an SVN repository?

For example:

svn co http://server.com/svn/trunk/test.file test.file
svn: URL 'http://server.com/svn/trunk/test.file test.file' refers to a file, not a directory

But I can download directories in this way.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Max Frai
  • 61,946
  • 78
  • 197
  • 306

3 Answers3

42
svn export <URL> <PATH>

Path is optional

svn export

And for uploading a single file
svn import

Dan McClain
  • 11,780
  • 9
  • 47
  • 67
2

I don't think you can check out a single file.

If you just want the file and don't care about svn, you can use wget:

wget http://server.com/svn/trunk/test.file`

If you already checked out the trunk directory, and you are in your local copy, you can update a single file:

svn up test.file
Dagg Nabbit
  • 75,346
  • 19
  • 113
  • 141
1
svn checkout <url_of_big_dir> <target> --depth empty
cd <target>
svn up <file_you_want>
mcandre
  • 22,868
  • 20
  • 88
  • 147