I have a subversion project that have a repository and trunk
, tags
, branches
top-level items. For this project, trunk
contains a folders for a big parts like 'common', 'libs', 'core', 'help', 'install', 'tests' etc. The question: is it valid in subversion to branch trunk/common
or do i need to always branch entire trunk
?
I have checked - all seems work fine while branching trunk/common
, but TortoiseSVN don't show such branches in revision graph
:(. This leads me to the assumption that it is not correct to branch something over than trunk
.
Remember that Subversion merges changes into your working copy first, and then you commit them back to the repository. So Subversion will apply your branch changes to your working copy of trunk, and then you commit those changes to trunk.
Using the svn switch command you can have Subversion modify your working copy to reflect another directory in the repository. Switching may not sound that exciting but it’s key to branching and merging, as you’ll soon see. First off, ensure that your working copy has no local changes. Either commit your changes or revert them.
Before you reintegrate, ensure the two branches you will be using are in a clean state (have no uncommitted changes.) In command line enter the directory of the branch that you want to reintegrate your work in to (usually trunk) and run svn update.
Develop in your branch, periodically merging the latest changes from trunk into your branch When your development is complete, merge changes from your branch back into trunk Your local working copy reflects some directory in the remote Subversion repository. If you initially checkout trunk, then your working copy reflects trunk.
You can branch every directory in SVN but it's a best practice to branch from trunk. The result in tortoise is cause TortoiseSVN assumes branches are made from trunk folder instead of subfolders. The questions is why do you try that an what advantages do you expect from "branching " a sub-folder instead of trunk?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With