views:

263

answers:

6

After going through tutorials on getting started with Tortoise I am finally starting to get it, the confusion for me is after going through the setup process:

1) I create my SVN repo

2) I have my directory where I work, lets say it's called "My Site"

3) I use tortoise to rightclick my site and import them to my SVN...good so far I think...

4) This is where I think I get lost, I now need to right click on "My Site" and select 'checkout' This puts a folder inside "My Site" called "SVN" and inside "SVN" are the files copied from "My Site"

Am I doing something wrong with that last step? I would assume that now I can edit files in "My Site" and they will update but that doesn't happen. It is only if I work inside "My Site/SVN" that they will actually interact.

So would it be better to do steps 1 - 3, but make my checkout folder outside my original "My Site SVN". Then I can delete the old "My Site" folder and from now on just work in "My Site SVN"?

Thanks for any clarification on this!

+3  A: 

Once you import your project into the repository you need to 'checkout' the project into a new local directory. This copy becomes your 'working' copy.

You can delete (this step is always scary) your directory and then checkout into a new directory with the original name.

pdemarest
Don't delete it! Just rename it and delete it later when you are sure everything is working.
anon
+8  A: 

This question contains a step-by-step guide that others have found useful.

anon
+1  A: 

When you do the checkout click on the elipses (...) next to the "URL of the repository" and drill down to the folder you are checking out.

This should then checkout the folder into the correct place.

JonahSan
+1  A: 

You need a working copy, create a folder and do a checkout, then:

  1. Update or checkout a new working copy
  2. Do your changes
  3. Commit

When you've commited your changes it's okay to either keep the folder with the working copy for later use or deleting it as all changes has been commited to the repository.

If you need to test something it can be nice to create two working copies of a project and do changes related to one feature/bug in one and changes related to another one in the other.

svinto
A: 

Yes, it would be best if you checkout in a different directory and work in that. This directory contains special files that subversion uses to keep track of changes (these won't be in the original 'My Site folder'). You can eventually delete your old 'My Site' folder, if you're happy everything is working properly.

Amazing how many people don't read to the end of the question, btw.

wds
+1  A: 

I'd recommend reading the free SVN ebook for a good overview of how SVN works.

Fundamentally, once you have checked in your existing files to SVN ("My Site" in your case) you can get rid of that folder (I'd rename it or move it to a tmp folder until you're sure everything has worked, though)

Next, you need to check out a working copy of the files stored in the repository (In your case, I would probably do this so that the working copy is where your old "My Site" folder was). It sounds like when you checked out a working copy before you called it "SVN" but you are not limited to calling it this. You can now edit and change anything within your working copy.

Once you have finished making changes, and want to store them in the repository again, you should use the commit command on the working copy. If the repository changes, you use the update command to get these new changes included in your working copy.

Also, since it sounds like you're working on a web project (A bit of a guess on my part based on the "My Site" folder name), in which case what you may want to do is to check out a working copy onto your web server so you can deploy the site directly. Rather than checking out the trunk of your repository, you may prefer to create a tag at each release point, and also have a "latest" version tag. If the web server's working copy checks out the latest tag, a simple update is all that's needed to get the files onto the webserver.

Edd