Branch and merge of SVN code management (branch & merge)

This article is reproduced from: https://blog.csdn.net/wangjintao1988/article/details/53115302 Author: Programmer Lao Wang

First need to install TortoiseSVN, my version Version 1.9 2015/09/27 18:54:04 (r26833)

1、Check out

Right-click on the path to be checked out and select SVN Checkout. Fill in the address of the project to checkout in URL of repository, and click OK. As shown

2. Create branch

Right-click on the exported project, select "TortoiseSVN" -> "Branch/tag..." in turn , fill in the address of the branch in "To URL" in the pop-up window, and select HEAD revision for the target revision here. As shown

3. Develop separately

Checkout branch, develop independently and in parallel, commit & update continuously respectively.

4. Synchronize changes in trunk to branch

In order to prevent the difference between the two versions from getting bigger and bigger, it is necessary to synchronize the branch with the trunk regularly, that is merge the trunk into the branch.

First, update the local trunk to ensure that the local is the latest. Right-click on the branch project, select "TortoiseSVN" -> "Merge...", and select the first item "Merge a range of revision" in the pop-up window. It is suitable for merging changes between multiple revisions submitted on a branch or mainline into another branch.


Then click Next.


Now is to update the code on the trunk to the branch, so the "URL to merge from" here should fill in the path of the trunk. "Revision range to merge" is well understood, that is, you want to merge the changes corresponding to the revisions of the trunk into the branch, which can be a series of revisions, such as 4-7, 15-HEAD, or a single revision number. All updates can also be selected as all revisions. Then click Next to enter the following interface:


Just default, click Merge to update trunk to branch. Before clicking the Merge button, you can Test merge first to see if it is successful or not.

5. Merge branch into trunk

Same as 4.

6. Submit trunk to delete branch

The feature has been developed, you can delete your branch!

Programmer Pharaoh

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324909792&siteId=291194637