SVN to create branching and merging code

Source: Internet
Author: User
Tags svn
1.SVN Establishing BranchesThere will be two directories on the correct SVN server: trunk and branches. Trunk Directory The following code is the so-called major version, and the branches folder is mainly used to place the branch version. The branch version is dependent on the major version, so it must be done in the Trunk folder when the branch version is established. The following are the recommended steps:

(1) Checkout trunk version down from SVN. If you already have a trunk version on your local machine, you need to update to the latest code.

(2) on the locally captured trunk version of the file, right-click, pop-up menu, select the following menu items.





Pop up the following dialog box and press the request below to complete the configuration.




Click on the OK button and SVN will build the corresponding branch version.

2. Crawl the branch code from SVN

(1) on the local machine, create a new directory, from the SVN branch version path, crawl the branch version on the code




(2) The code can be updated and submitted normally in F:\branchesh_v20160726.


2.1 Delete the unwanted branch version (1) in the local machine's SVN directory, right-click, select Tortoisesvn/repo-broswer, go to Repository browse (Repo-browser), in the right tree-like window under branches, Select the branch version you want to delete, right-click the pop-up menu, and tap Delete. The branch can be removed from the code base.

3. Merge the code from the branch version to the main trunk version if the new feature development in the branch version is complete, you need to merge the changes on the branch into the major version, as follows:
(1) Before merging the code, we will first update the branch code to prevent others from submitting the code and you are not updating it in time. Cause someone else's code to be lost.


(2) What we're going to do next is commit the code that will be modified. To keep other people's code up-to-date.


(3) Before we merge the branch code into the trunk, we will update the skeleton code first. To ensure that the code after the merger of other personnel can be updated in time to your local. Step in the same step (1).
(4) After the skeleton code update is complete, we open the log of the branch code


(5) Find the code log you want to merge into the trunk. Then right-click on the menu, select Merge revision to, then select your skeleton directory to determine


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.