Version management tool SVN

Source: Internet
Author: User

This document is based on the teaching video summary of the life teacher of Mu class net source

Video Address http://www.imooc.com/learn/109

A SVN Download and install configuration

Service-Side https://www.visualsvn.com/server/download/

Client https://tortoisesvn.net/downloads.html

?

Two files after download

?

    1. Server-side Installation

In addition to the next step of the installation path and warehouse path, the rest will not change, all the way next

?

?

2. Configure the server side

?

(1) New warehouse

The warehouse can be divided into a number of different, each project in a separate warehouse

?

Right button on the circle, name, all the way next, a new warehouse

?

(2) New users

Enter user name and password

Service-side configuration completed

?

3. Installing and configuring the client

In addition to the installation directory, all the way next

?

After installation, you can find a checkout function in any folder by right-clicking the mouse.

This feature is the first time you need to download from one of the repositories in SVN.

After clicking this circle, the following is required, and the path of the server checkout needs to be entered;

?

First fill in the URL Repository

?

At this point, go back to the server, click the repository you want to download, the path to the right

?

There are two things in this case:

    1. The client and server are on a single computer:

Fill the path to the URL Repository

    1. Client and server are not on a single computer: Change the computer name to the IP port of the server: port number

This port number is the port number when the server is installed

?

?

Then fill in checkout Directory: where you want to download

The first time you download, you need to enter the user name password, which is established on the server

?

After the download is complete, one more folder is automatically

Click Open, if the display is empty, refer to Win10 http://jingyan.baidu.com/album/acf728fd2853fef8e410a37f.html?picindex=4

?

The folder is visible as follows:

?

Do not delete this folder, delete the waste, it becomes a normal folder, not to contact the server.

The client can be manipulated under this folder: Add and revise ...

?

Two SVN basic Operation 1. New file

Create a new file under the file you just downloaded Test.java

Under this folder, right-click below

?

?

?

Look at the server refresh test to see that the submission was successful.

?

2. deleting files

If you want to delete it, delete it under the disk, but not the SVN operation

Try to delete this file, and then submit the SVN can see the file missing, if submitted to the server, the server file is deleted.

3. Modify the file

The following big Circle area is the description of this modification, let others know why you changed.

?

After the changes are submitted, the following operations are done on the server:

?

Appears in the browser:

Once you've verified your identity, you'll see the modified code

?

Three Problems

Many small partners have permissions to test warehouse operations

Like what

?

b to complete the file, submitted, a in their own files, update, found that their code has been changed by others, their own code can not be found, then SVN will let you know who moved the code, how to retrieve the code!

This is history! See the culprit.

?

To revert to a version:

Local update is good!

?

If the small partner mistakenly deleted the code, under the test folder Showlog

Save this version directly in your folder

?

1. SVN auto Merge

A b at the same time download the latest files, their respective changes, B submitted first, A and then submit, will fail, need to update, then the code is the SVN automatically merged code.

?

If AB is not modified in the same line, it's good.

?

But if it is in the same line of code to change, before committing, the folder will be three more files , then do not submit! SVN doesn't know how to merge.

?

Now open your file (1), the inside has been identified, where there is a problem: The latest code is what kind of, you have to discuss with the latest authors.

?

In the three files that appear, (2) Test.java.mine is my code. The next two (3) (4) are the latest two versions of the code, with the suffix having a version number. (4) is the latest version.

?

It's been discussed.

If the result is your code, do not change in (1), because it automatically generated code, it is cumbersome to change. Only need to overwrite (1) The file with suffix Mine (2) (suffix name)

?

If the negotiation result is (4), on (1), right-click,

?

?

2. Code comparison

Copy your own code elsewhere

Revert to the previous version

Update

Change your previous code to a name, copy it to the SVN folder, select two files, compare

To discuss the problem, after the completion of the submission, delete their original documents.

?

Another situation:
A did not find B changed the code, continue to change on the top of B, buried hidden trouble. b so too.

Later a discovered this problem, at this time, has passed many editions. I'm going to talk to B.

?

To show log, in the log, one version of the comparison can be.

Version management tool SVN

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.