Using TortoiseSVN (a command line solution is OK too), without creating a folder on the repository side, what are the steps to checkout a single file, edit and check back in with comments?
-
I think you meant to say "without creating a folder on client side" – Joe Phillips Apr 20 '09 at 14:57
-
2If thats the case, duplicate http://stackoverflow.com/questions/122107/checkout-one-file-from-subversion – Daniel A. White Apr 20 '09 at 14:59
5 Answers
AFAIK you cannot get a copy of a single file from SVN, a working copy is always a directory. So you will need to check out a whole folder in order to edit the file in question and then commit.
This was the case some time back (less than 3 months) and I doubt it has changed since then.

- 30,738
- 21
- 105
- 131

- 4,548
- 8
- 37
- 57
- Right click in Windows Explorer where you want a working copy.
- Choose Check Out. It might be in TortoiseSVN's menu.
- Enter the URL and accept to get a working copy.
- Make the change to the file.
- Right click in the working copy. Choose commit.
OR
Refer to Stack Overflow question Checkout one file from Subversion.

- 1
- 1

- 187,200
- 47
- 362
- 445
-
1AFAIK, you mus check out the entire folder (to get the .svn file), which means you CAN NOT just check out one file. If that is correct, then this is NOT a helpful answer. The URL is helpful, however. I'd remove the top portion of this answer and just keep the OR. – Kit10 May 10 '12 at 19:50
This is possible with TortoiseSVN, but you must checkout the parent directory as well:
- Create a working copy of the directory with no contents (use checkout depth "Only this item")
- Click on the new working copy and right click to select the repository browser (TortoiseSVN -> Repo-browser)
- Right click the file of choice in the repository browser and select "Update item to revision"

- 30,738
- 21
- 105
- 131

- 121
- 1
To check out a single file, you'll still need to check out its parent directory. From the command line, to check out https://svn.example.com/trunk/myfolder/index.html
:
svn co https://svn.example.com/trunk/myfolder/ --depth empty
svn up myfolder/index.html
Now, you can edit and commit this file as usual, without checking out anything else.
TortoiseSVN also includes "checkout depth" in its svn checkout menu option; however, I don't know of a way to make Tortoise do svn up filename
on a file that doesn't exist.

- 13,231
- 6
- 37
- 39
You have a file single.txt you want to commit.
The right procedure is :
cd /path/destination_directory
svn up
svn commit single.txt -m "Insert here a commit message"
Hope this will help.

- 69
- 1
- 7