SVN---team development

Source: Internet
Author: User
Tags svn svn update tortoisesvn

Install and download client side
1. Installation Tool Preparation

2. Summary of what is SVN (Subversion)
There is a simple but not very precise analogy:
SVN = version control + Backup Server

In short, you can take SVN as your backup server, and better yet, he can help you remember the contents of every file uploaded to this server. and automatically give each change a version.

In general, we call the place where the uploaded files are stored to be repository. In Chinese, it's kind of like the meaning of a file warehouse. However, we usually use the term repository. Basically, the first time we need to have a new (add) file action, put the file you want to back up on the repository. In the future, when you have any changes, you can upload to repository above, upload the existing and modified file is called a commit, that is, submit changes to SVN server meaning. Each COMMIT,SVN server is given a new version. At the same time, it will also be recorded on each upload. In the future, because of certain factors, if you need to download the files you have submitted from repository. You can choose to get the latest version directly, or you can get any previous version. If you forget the version, you can still try to get a date version by memory.

3. Why should I use SVN?
3.1 Backup of working files is very important. You never know when a hard drive on your computer is going to break down. According to the rule of thumb plus Murphy theorem, bad feelings often occur at the most important moment.
3.2 Version control is very important. You can't guarantee that the latest version on hand will always be right.
Data synchronization among 3.3 of partners is also very important.
3.4 If there is no good way to back up a different version of the hard disk space is very expensive.

4.SVN can help us solve the problem above.
The answer is yes:
4.1SVN repository can be a directory on your computer, or a portable disc (not recommended). Of course, it can also be the company's server. The
4.2SVN has a great version control mechanism. All uploaded versions will be recorded for you. You can get a version at any time in the future. Also, there are versions of branching and merging and other useful functions. The
4.3SVN allows different developers to access the same files and use SVN server as a mechanism for synchronizing files. That is, when you have a file update, you do not need to send the file to your development member. Just tell him the new version is already on the SVN server and ask him to go to SVN server to get the latest version. Also, SVN server can do this when you upload a new version, automatically send letters to the relevant members. The
4.4SVN is stored in a way that uses differential backups. That is to say, he only backs up different places. So it is very hard to save space. In addition, he can also make differential backups for so-called non-text files.

5. How to set up SVN Repository under Windows.
After pressing the right mouse button, select Tortoisesvn->create repository here.
This means that your SVN repository has been successfully established. The next step is to get your files back in. In the future, as long as we need to use this repository, we can use File:///E:/SVN_REPO to express it. SVN is the way to get in touch with repository through this URL. The various URLs are formatted as follows:
file:///disk drive |/repository Directory/subdirectory
http://account @ server name/Repository directory/subdirectory
https://account @ server name/Repository directory/subdirectory
svn+ssh://account @ server name/Repository directory/subdirectory
6.SVN usage Process

7. Update to a specific version
Sometimes we need to backtrack to a specific date or version, and then we can take advantage of the SVN update to revision feature. Press the right mouse button above the file or directory icon that you want to update. and select Tortoisesvn->update to revision.

In this update window, you can choose to update to the latest version (head). Optionally, you can choose to update to a specific version (Revision). Of course, you may not remember the correct version number long ago. May only vaguely remember the approximate time. Don't worry, press the Show Log button and you'll be able to review history.

All the actions you've done, their dates and their versions will be listed on this window, just click on the version you want, turn it into white, and press OK. This version is automatically filled in the revision field in the Update window. You just press the next OK and this version will be taken out to your hard drive.

8. copy files and directories
Many times you will want to have another copy of the catalog for the new editing. Wait until the modification of this branch has been finalized, and then merged into the original major development version. For example, we currently have the following directories and files under working copy:

Now, we're going to build a branch for the trunk directory. Suppose we want this directory to be in D:\working\my_prj\branch \my_new_branch_for_testing. First, we can press the right mouse button below the trunk directory or directly under the trunk icon.

Press OK to close the window. If you go immediately below working Copy's branch subdirectory, you will be disappointed to find that there is no directory just specified below. This is because your working copy part is still old, and you just need to do SVN update under the branch subdirectory to see the new directory. The new directory has nothing to do with the original directory. You can edit it at will, until you have confirmed that all the work done under branch is complete, you can choose to merge the branch back into the original trunk directory, or keep it in branch.

The method is simple to merge back into the trunk directory. In the above example, in the D:\working\my_prj\trunk directory space, we press the right mouse button, select the merge:
9.SVN Server Change IP address client how to set
9.1 If the client tool is TortoiseSVN, right-click on the working copy, select Tortoisesvn->relocation, and then enter a new URL.

9.2 If the client tool is an Eclipse plug-in subclipse, switch to the SVN repository perspective, and then right-click on the repository path –> ..., enter a new URL. 


Summary: Development team Development, can be a convenient division of work, and when you modify the same part, SVN will also prompt you.

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.