Search This Blog

Thursday, January 13, 2011

SVN creating a branch

Creating a branch on SVN is extremely easy. All you need to do is use SVN COPY command.

svn copy svn+ssh://your/server/trunk svn+ssh://your/server/branches/MyBranch

Supposing that your 'trunk' is your head version and 'branches/MyBranch' is your branch folder.

In the above picture the left-hand line (9161 to 13905) is the main head line. I'd created two branches along the way from revision: 13515 and revision 13905.

One of the best things that SVN COPY does is that it DOES NOT COPY the files really - it justs links them. So that they do not take any extra space on your HD drive. If you commit to branch  only the changes are stored. It is very similar to  linux  BTRFS file system.


  1. It helped me a lot....thank u, can u please tell me how to import files from local system to source control. I'm stuck at importing files to source control.please help me out of this..

  2. Well, from what I understand you need to copy these file to the directory where you keep your local repository. Then add these files to the SVN repository and commit changes.
    In other words you checkout the repository to your local filesystem, then copy the files you want to add to this destination, click add (e.g. in your TortoiseSVN) and then 'commit' changes to the remote repository.


If you like this post, please leave a comment :)