开发者

Am I expected to manually create the trunk/ and branches/ folders w/ Subversion, or are those folders created by themselves?

开发者 https://www.devze.com 2023-03-01 01:47 出处:网络
I am having some trouble grasping something pretty simple about subversion: If I want to have a subversion repo with a trunk and several branches, do I have to manually create the trunk/ and branches

I am having some trouble grasping something pretty simple about subversion:

If I want to have a subversion repo with a trunk and several branches, do I have to manually create the trunk/ and branches/ folders, and from then on it's my responsibility to keep everything tidy and in the correct place?

I can give a c开发者_JS百科oncrete example to back up the above question:

Let's say I've created a Subversion repository and I've checked it out to some folder F.

F is at this moment empty (it actually has that .svn folder, but that hardly matters). I add a couple of files to F and hit commit.

Now I want to create a branch B. I (through Tortoise) hit the Branch command, but it is asking me for a folder to which to copy my data. I don't have at the moment any folder to which copy the data!

I was introduced to branching in version control systems by git, so my thought process is shaped by the way git branching system works.

Thanks


You create /branch, /tag, and /trunk folders. And yes, it's your responsibility after that to put things in the appropriate place.

Branches aren't special in SVN; you can think of trunk as a branch.

Tags are special. Those should be labeled, read-only snapshots of code that was deployed.


Yes, branches/tags in SVN are not special (unlike other version control systems like ClearCase etc). That's just a way to organize the stuff and make it conform to standards.

Like it's been said earlier, when you create a repository, it's your responsibility to create the tags/branches/release folders.

0

精彩评论

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

关注公众号