Subversion Branching


Drippy by jurvetson

Subversion branching and tagging is basically copying from one repository directory to another.

This article gives great instructions on how to branch and tag with subversion. This article is also good.

This is an example of creating a branch from the trunk.

$ svn copy svn+ssh:// svn+ssh://

This is an example of tagging the trunk.

$ svn copy svn+ssh:// svn+ssh://

To compare branches you can simply do something like this svn diff [path] [path]. For example:

$ svn diff

To merge from a branch to the trunk you can use svn merge like this. Note that you need to have the trunk checked out.

$ cd trunk
$ svn merge -r 3:4 svn+ssh:// doc/html

To merge from the trunk to the branch you can try something like this.

$ cd branches/stable
$ svn merge svn+ssh://

You may want to use the --dry-run option when you first run the merge to see how it will go. There might be a lot of conflicts.

Leave a Reply

Your email address will not be published. Required fields are marked *