Abstract:Software Development, where developers work together parallelly is the standard develop mode actually, needs the revision control tool to assistance the development widely. Most of the tools today could merge the code changes from different branches edited by different developers. These tools are based on code text differ comparation line by line, and the merged code isn't always the prediction of the developers. This paper presents a new branch merging algorithm which intends to provide a better result. We build an abstract syntax tree of the code block where the traditional merge gives a code confliction. Then we merge this code block of different revisions automately based on AST nodes comparative analysis. In this way, the code conflictions and manual work in branch merging could be reduced. At the same time, the development efficiency would be improved.