SVN Merge branch with trunk

Posted on Saturday December 10, 2011 / by Eric Potvin

Here's a quick article on how to merge your branch to your trunk assuming you already in your working copy (using svn co and your current changes are committed (using svn ci) in your branch.

Switch to the trunk

svn switch ssh://svnserver/myproject/trunk

Find the revision

In the branch directory, run:

svn log --stop-on-copy

This will display the changes that has been made to the point the branch was created. You will see something like:


Merging to the trunk

svn merge -rXXXX:YYYY ssh://svnserver/branch/myBranch

This will copy your new code from your working branch for the trunk.

Committing the changes

svn ci -m "MERGE branch to the trunk"