Branching and merging in Subversion

Posted Over 13 years ago. Visible to the public.
  • Create a branch: svn copy https://dev.makandra.de/svn/filepanic/trunk https://dev.makandra.de/svn/filepanic/branches/$ticketnumber_shortdesc
  • Don't just copy the folder into your working copy and try a commit without a merge because Subversion will die on you.
  • Work on ./branches/$ticketnumber_shortdesc.
  • If you work on a long story it is useful to sometimes merge the trunk into your branch so there will be less pain later: svn merge https://dev.makandra.de/svn/filepanic/trunk ./branches/$ticketnumber_shortdesc.
  • When you're done working on your branch, commit all changes in your branch: svn ci ./branches/$ticketnumber_shortdesc
  • Merge the branch back into the trunk: svn merge -r $REVISION:HEAD https://dev.makandra.de/svn/filepanic/branches/$ticketnumber_shortdesc ./trunk. $REVISION is the revision number, at which you started working on the branch. You can find the number using svn info ./branches/$ticketnumber_shortdesc`
  • Once all conflicts are resolved: svn ci ./trunk
Last edit
About 7 years ago
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted to makandra dev (2010-08-25 14:23)