Merge a Branch into Trunk
- Check out a copy of trunk:
svn co svn+ssh://server/path/to/trunk
- Check out a copy of the branch you are going to merge:
svn co svn+ssh://server/path/to/branch/myBranch
- Change your current working directory to "myBranch"
- Find the revision "myBranch" began at: This should display back to you the changes that have been made back to the point the branch was cut. Remember that number (should be rXXXX, where XXXX is the revision number).
svn log --stop-on-copy
- Change your current working directory to trunk
- Perform an SVN update: This will update your copy of trunk to the most recent version, and tell you the revision you are at. Make note of that number as well (should say "At revision YYYY" where YYYY is the second number you need to remember).
svn up
- Now we can perform an SVN merge: This will put all updates into your current working directory for trunk.
svn merge -rXXXX:YYYY svn+ssh://server/path/to/branch/myBranch
- Resolve any conflicts that arose during the merge
- Check in the results:
svn ci -m "MERGE myProject myBranch [XXXX]:[YYYY] into trunk"
That is it. You have now merged "myBranch" with trunk.
No comments:
Post a Comment