TortoiseSVN merge branch

In the project development module, programmers generally pull out a branch for module development. When the module development is completed, the branch needs to be merged into the trunk.

 

  • Project A main project
  • Project B branch development project

Merge branch to trunk step

  1. Mouse select A project right->TortoiseSVN->Merge
  2. Select Merge a range of revisions Next
  3. Select the URL of the SVN of project B in URL to merge from
  4. Go directly to the next step without making any choices
  5. Submit the code after the merge is complete

diagram



 

A: Merge a version range

This type is merged according to the version number specified by SVN, and it is also the most flexible way of merging. It can be merged from the trunk to the branch, or the branch is merged into the trunk; the main application scenario is to synchronize the branch or part of the changes in the trunk to the trunk or branch; even two branches of different libraries are supported, of course, the two branches require the same (same directory).

B: Revival branch

Merge the branch to the trunk, where all the modifications of the branch will be merged into the trunk. If you only want to merge a part, it is not suitable to use this type; and this type of merging has many restricted conditions, such as the branch and the trunk must be Is in the same library, the local working directory cannot contain modified files, etc.

C: Merge two different trees

Merge the differences between the two branches into the local working directory; in fact, it can also synchronize the code of the branch to the trunk, just specify the merged from as the trunk URL, to as the branch URL, and the local working directory is the trunk.

 

 

URL to merge from Select a trunk/branch address ( because in this example, B is merged into A, the address here is the URL address of B's ​​SVN )

Revision range to merge Select a revision


 
 


 

 

There are many examples of merging branches on the Internet, and there are more detailed explanations for each step, so this article is not very suitable for learning, because only a few points in the article are not very helpful for learning, work The key is to solve problems efficiently.

 

Guess you like

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