Branches

How to branch a project to work on a fork of your code.

Creating a branch

svn copy http://<your.svn.server>/svn/project/trunk \
http://<your.svn.server>/svn/project/branches/branchname \
-m "Creating branch of /project/trunk"

Switching a Working Copy
The svn switch command transforms an existing working copy into a different branch. As an example, we could take a working copy of a Drupal 5.x website, checked out out from trunk, and switch it into a branch when we want to update the trunk to Drupal 6.x:

cd /path/to/working/copy
svn info | grep URL
svn switch http://<your.svn.server>/svn/project/branches/branchname
svn info | grep URL

Merging a change from Trunk into the Branch
http://nedbatchelder.com/text/quicksvnbranch.html
http://www.orcaware.com/svn/wiki/Svnmerge.py
http://www.technoids.org/svnmerge.html
http://cheat.errtheblog.com/s/svnmerge
http://research.mosuma.com/faq/howto/svn_branch_merge

Find out what revision your branch is at:

svn log --stop-on-copy

See what the changes are:

svn diff -r 60:75 http://trac.example.com/svn/project/trunk

Merge it (add --dry-run to see what the changes would be):

svn merge --dry-run -r 60:75 http://trac.example.com/svn/project/trunk .
svn merge -r 60:75 http://trac.example.com/svn/project/trunk .

Merging branch into trunk
http://svnbook.red-bean.com/en/1.1/ch04s04.html

Recent Updates

  • 1 year 11 months ago
  • 1 year 11 months ago
  • 1 year 12 months ago
    php 8.x
  • 1 year 12 months ago
    10.6.7
  • 1 year 12 months ago
    Drop Centos 5/6 stuff