SVN Switch – Switching to or from the Trunk to a Branch

I recently had to make my first branch on a project using svn. Making a branch is easy enough with svn copy, but where do you go from there? You could check out a fresh copy of the branch from the repository, but you already have the environment setup and working for the trunk copy. There is an easy and elegant solution, and it lies within svn switch. First navigate to your working copy via the command line. Now to switch to a branch, or tag, in the repository, simply type:

svn switch http://svn.example.com/project/path/to/repo/branch .

Your working copy will now be the branch copy, and any committed changes will go to the branch. It is a simple and easy to use command that should speed up your development.

This entry was posted in Version Control. Bookmark the permalink. Both comments and trackbacks are currently closed.

2 Comments

    Error thrown

    Call to undefined function ereg()