When discussing branching and merging, it can be useful to illustrate common patterns with version control diagrams. A convenient method for making these is with the PGF/TikZ package within LaTeX. The following are some simple examples with source code.
A simple feature branch, that is merged back into the trunk. Source Code.

A couple of feature branches that are synchronized with trunk, and one is shown being merged back into trunk. Source Code.

Multiple release branches, with changes merged to trunk. Source Code.
