Use TortoiseSVN to create and merge branch graphics tutorials

Source: Internet
Author: User
Tags commit svn tortoisesvn

Open the Trunks directory and create a new two text file in the Trunks directory,

Open and enter the following:

The file can be entered randomly, and this example is used primarily to observe the subsequent changes.

Two file edits are completed with SVN commit to submit the changes to SVN:

  The following starts to create a branch:

1, on the trunks right click on the TortoiseSVN menu to select Branch/tag;

2, in the To Path input box to enter the new branch of the path, generally:/branches/branch name, which is equivalent to the branch saved path name;

3, in the following select Head revision in the repository, for the current SVN trunks directory of the latest code to establish a branch, if you need to establish a branch for the revision, you can choose;

4, click OK Branch set up to complete.

Open the branches directory, find that the directory is still empty, do not have just established the branch, this is because the branch established operation is done on the server side, when you need to edit the branch, in the branches directory click Update, the branch just established will be downloaded.

The process of establishing a branch is very fast and will not slow down because of the number of files in the trunk, as a follow-up explanation.

  Merging branches with TORTOISESVN

The second article has been given examples, there may be trunk, branching parallel development, the following we simulate.

Update the newly created branch, open the in the branch, and edit it as follows:

To open the in the Trunks trunk, edit it as follows:

Changes to the above two files basically simulate branching, trunk parallelism, and the same file is modified separately in two directories.

Commit the changes in the above two files to the merge operation below.

  The following starts merging branches to the backbone:

1, on the trunks right click on the TortoiseSVN menu to choose Merge;

2, in the pop-up window select the second item, can be understood as merging two trees;

3. Select the branch directory to be merged in from and to;

4, in from the revision select the creation of a branch of the revision, specifically, click Show Log, select the bottom of the line;

5, in to the Revision select Head Revision, that is, the latest operation;

6, click Next, the next page using the default, click Merge;

7, the completion of the merger.

At this point, you will find that the files in the trunks directory have been modified, this time the merge is done locally, and not submitted to SVN, which is different from the establishment of the Branch, please note.

That is to say, if you find a problem in this merge, you only need to revert the trunks directory and discard this merge.

You can look at the merged trunks Directory file, you and the previous control, has reached the merge effect we want:

  What happens when you create a branch

The SVN server's copy of the branch when it is created is very efficient, instantaneous, and requires little space to store, so there is no need to worry about the problem of excessive branch creation causing the project warehouse to swell.

It can be understood that SVN stores a reference to a file, not a physical copy, in the server.

  Do not merge the same branch to the trunk multiple times

Merging branches has the principle of not merging multiple branches of a branch into the trunk many times, although it is possible for you to modify the branch after merging.

As mentioned above, when merging a branch, you need to select the version of the merge in the revision option from, and if it's the first one you just need to select the earliest version, but if you combine it once, can you really remember what the last revision of your last merge was?

A good operation is to create a new branch after merging.

  Merge trunk to Branch

In fact, merging is a reversible process, merging the backbone to the branch and merging branches to the backbone is just the opposite of the operation, if you have a different one should be very simple.

Here I will not demonstrate, if you really need to be able to comment on the blog, you really need to I will write out.

Record, for better yourself!

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.