Use Svn in vs Environment

Source: Internet
Author: User
Tags svn client tortoisesvn

As my colleagues and I want to work together to build a small program, we need a source code management tool.
At work, we usually use TFs for project management because vs is used for. NET development. However, we work in different project groups in different locations, and the existing TFs servers are
Therefore, TFS cannot be used. In this case, you only need to find the public network's free source code management service!

If it comes to source code management on the Internet, the first thing I think of is CVs, which is now SVN. So I plan to use SVN for source code management. The following describes how to use Svn in the vs environment:

1. Apply for a free SVN space.

I'm using a http://svn.w18.net/index.php.
Free space. Domestic servers, the speed is good, there is no limit on the number of projects. However, if a private project is created, it can only be used for free for one month. Only open-source projects can be used for free.

2. Download the client.

In Windows, the most famous client in SVN is tortoisesvn. Yes: http://tortoisesvn.net/downloads
I don't need to talk about the specific usage. There are many articles on the Internet.

However
Tortoisesvn is only a common SVN client in windows. It is not a habit for us to use Vs + TFS, so it is best to have it in.
Direct migration. Someone can think of it. Ankhsvn is a plug-in of Svn in vs. After installation, SVN can be used in. : Http://ankhsvn.open.collab.net/

3. Configure the client.

(1) Open Vs and you can see the ankhsvn option under the tool menu,

(2) Selecting repository Explorer will display the repository Explorer window, which lists the current repository. Click
Click to add the svn address applied for in step 1.

(3) After adding the address, the added address will appear in the repository Explorer window. Right-click the address and the following menu will appear:

You can select "new directory" to create a folder, and then put the source code into this folder, you can also directly select "checkout folder" to set the local source code folder. Here we will set checkout folder as the folder of our project.

(4) After setting, open the project in this folder. A dialog box is displayed:

Select "yes" to start Ankh for the project.

(5) After opening the solution, right-click the solution and you will see the menu under the ankh option.

(6) Select the "add" command. The select items to add window is displayed,

In this window, you can add the solution file to SVN.

(7) What is different from TFs or VSS is that adding files to the server is not recursive, that is, only files are added here. SLN file, in the specific project. the CS file is not added. You need to execute the Add command multiple times to add all source code in the entire solution to the svn server.

(8) after the file is added, the status of the file is displayed in vs by adding a map icon before the file,

(9) You can directly enter the svn address of the project in the browser, enter the user name and password, and then you can see the files on the current server.

4. Download the source code.

For the code that already exists on the server, you only need to set the svn path of the server, and then execute "checkout folder" to set the local path as before to copy the code on the server to the local.

5. Check in and add code at any time.

In vs, right-click the file to be checked in and the following menu is displayed:

Selecting Commit is to check in the code, and updating is to get the latest version ......

I have just started using SVN, so I just have a superficial understanding. I will continue to write it down if I find any good information in future use. I hope this article will be helpful for beginners who want to use SVN in the VS environment.

[From the deep blue residence of the blog Garden
, Reprinted, please indicate the author's source]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.