Branch and merge operations of SVN under eclipse

Source: Internet
Author: User
I have been using "Little Turtle" for Branch establishment and merge before. Recently I switched to Linux for development, and there was no "Little Turtle". I had to check the establishment and merge of the branch by using the svn plug-in of Eclipse.

First, let's talk about how to create a branch. Just copy a trunk directory to branches, as shown in:

 

Right-click your project ==> team ==> branch/Tag

The following information is displayed:

This box shows you where to copy data. Here we copy data from the trunk location to the branches directory, and click OK to create it, if the switch working copy to new branch/tag is selected, eclipse automatically switches to the branch. we do not select this option. We will switch it later.

OK. After the branch is set up, let's check the directory structure of the current SVN, as shown in:

We can see that branches has a cms2.0

Now let's manually switch to the cms2.0 branch for development:

Right-click your project ==> team ==> switch ==>

Enter your branch path in the window and click OK.

Now we have switched to cms2.0. Let's get started with development. We have updated the Pom. XML file, we add a line in it, such as aaaaaaaaaaaa, and then submit it. after the development is complete, we need to switch back to the trunk now, that is, switch back to the trunk under trunk according to the above method:

 

OK. Now we have to merge the branches into the trunk. What should we do.

Right-click your project ==> team ==> merge, and the following dialog box is displayed:

 

The above "Starting path" refers to the path you want to merge to. Here we select CMS under trunk

The following target paths are merged, that is, your branches.

You must select either the latest version or the latest version. If you have selected the version but have not entered the version number, the merge button is unavailable. Here we select the latest version ", click merge.

Now let's take a look. The Pom. xml file edited under branches is merged to the trunk.

 

The common practice of SVN is: first, try to merge automatically. If it is done automatically, only merge directly. Otherwise, manual intervention is required to resolve the conflict.

 

In this way, the operations under tags are similar, but the files under tags are read-only by default and cannot be edited.

 

I wrote it for a while. After reading it, I will post it back. Thank 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.