Branching with TortoiseSVN

Flow

  • Create a new branch
  • Switch your local working copy to the new branch
  • Develop in the branch (commit changes, etc.)
  • Merge changes from trunk into your branch
  • Merge changes from branch into trunk
  • Delete the branch

Original article: http://stevesmithblog.com/blog/simple-branching-and-merging-with-svn/

Create a new branch

screenshot

screenshot

From WC at URL – will be path where you make previous step

To URL – path where branch will be created (usual: branches/YOUR_BRANCH_NAME)

screenshot

Switch Local Working Copy to New Branch

screenshot

screenshot

Develop in the Branch

As usual

Merge Changes from Trunk into your Branch

Instead SVN Update command use Merge

screenshot

screenshot

URL to merge from – will probably be trunk, leave all other blank

screenshot

Default settings in most cases will match your needs

screenshot

It there is conflicts, you will see something like this:

screenshot

Merge Your Branch Back Into Trunk

screenshot

screenshot

screenshot

screenshot

You’ll see this if you have not committed changes is your branch

screenshot

Noticed, that in new versions of SVN, first you need to switch back to trunk, then make reintegrate branch, and in from url put url to branch that u want to reintegrate.

Delete the Branch

screenshot

screenshot

screenshot

You can easily restore any deleted branch