6

I have read Branching / Tagging twice now. I cannot seem to grasp this idea. I want to have a a good understanding of branching, to prevent errors to the main line.

Since I am a visual learner, can anybody diagram the concept of SVN Branching? Or is it possible in plain English to describes the concepts?

lets say i have 3 developers on a team and one repo "out_app" how would dev1 create a branch and merge back to the main line? how would this effect dev 2 and 3?

detail the steps, menue items clicked, settings entered... for the above questions.

mike
  • 71
  • 3
  • 5

3 Answers3

11

See A Visual Guide to Version Control. Great article.

alt text alt text

Community
  • 1
  • 1
Michael Hackner
  • 8,605
  • 2
  • 27
  • 29
8

You can start reading the SVN readbook on Branching and merging

alt text

It is based on cheap copies:

Subversion's repository has a special design.
When you copy a directory, you don't need to worry about the repository growing huge—Subversion doesn't actually duplicate any data. Instead, it creates a new directory entry that points to an existing tree. If you're a Unix user, this is the same concept as a hard-link.
As further changes are made to files and directories beneath the copied directory, Subversion continues to employ this hard-link concept where it can. It only duplicates data when it is necessary to disambiguate different versions of objects.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

(In my opinion) the best modelling and explanation of good revision control branching is in The Flow of Change by Laura Wingerd, a conference presentation made about Perforce. It describes the tofu scale, where changes flow from "soft" branches (untested, unstable) up to "hard" branches (released, well-tested) as revisions become more solid.

It provides a very understandable metaphor for managing revisions and branches; I cannot recommend highly enough that everyone reads through this presentation and absorbs its ideas.

tofu scale http://dl.getdropbox.com/u/136976/tofu%20scale.png

Ether
  • 53,118
  • 13
  • 86
  • 159
  • +1. I mentioned her (Laura Wingerd) in my answer on the SO question "When should you branch?": http://stackoverflow.com/questions/2100829/when-should-you-branch/2107672#2107672 – VonC Mar 09 '10 at 22:17