开发者

SVN best practice - checking out root folder

开发者 https://www.devze.com 2022-12-25 04:23 出处:网络
Once the structure of a repository is set up, i.e. trunk, branches, tags, is it normal to have the root checked out to our local mac开发者_运维技巧hines. Or should you only check out the trunk if that

Once the structure of a repository is set up, i.e. trunk, branches, tags, is it normal to have the root checked out to our local mac开发者_运维技巧hines. Or should you only check out the trunk if that's what you are working on or a branch if we so choose to create one.

The reason I ask is that every time someone creates a branch or tag we all get a copy when we do an update.


No, that is highly unusual. That will make svn update really suck if you have lots of branches and such. Also, it's annoying -- at least to me -- to navigate that far down to get to your actual code. Just check out trunk or whichever branch you happen to be working on. You can use svn switch if you want to change back to trunk or to a different branch. Use svn help switch for more info on that command.


When you check out the root folder, every branch and every tag is copied to your local machine when you update. Over the years, this can amount to a lot of stuff even for small projects. So if you do this, make sparse checkouts of the branches and the tags, only recursively updating one if you really need it.

Other than that, yes, go ahead and checkout everything if you like it. I usually do it because I like being informed when new branches or tags are created. But it's not necessary. You can always switch your working copy between (the trunk and) different branches whenever you want to.

0

精彩评论

暂无评论...
验证码 换一张
取 消