svn的branching和merging

典型的用法:

  1. 从trunk分支复制一个branch分支:

  svn copy file:///home/kent/svntutorial/trunk file:///home/kent/svntutorial/branches/
firstBranch

 

  2. 把trunk分支的改动同步到branch分支

  cd
firstBranch的working-copy目录

  svn merge file:///home/kent/svntutorial/trunk

  3. 把branch分支的改动同步回trunk分支

   cd
trunk的working-copy目录

   svn –reintegrate merge file:///home/kent/svntutorial/branches/
firstBranch

  4. branch分支同步回trunk后应该停止使用,最好把它删掉。

 

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.