betweenGo

Subversion Branching

by on Dec.18, 2007, under Subversion

Drippy

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://fkim@betweengo.com/home/fkim/svn/foo/trunk svn+ssh://fkim@betweengo.com/home/fkim/svn/foo/branches/stable

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

$ svn diff http://foo.com/branches/stable http://foo.com/trunk.

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://fkim@betweengo.com/home/fkim/svn/foo/branches/stable/doc/html doc/html

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

$ cd branches/stable
$ svn merge svn+ssh://fkim@betweengo.com/home/fkim/svn/foo/trunk

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.

Share

Related posts:

  1. Subversion on Dreamhost
  2. Perforce Branching
  3. Implement RSA Authentication Under SSH
  4. Newline problems with Subversion
  5. Subversion Undeleting

:

Leave a Reply

 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!