I am a web developer. I have created my own PHP framework that I intent to use across multiple projects. Being new to SVN (and VCS in general) I am unsure on quite how to run my repo. What I am thinking of doing is this: Have a trunk for my framework, including library files, common models, and some stub controllers and views. Then for a new project I would branch from the root, naming the branch ‘Project n+1’. Then develop this project as a new live project, commonly adding work to the controllers and views specific to that project, but occasionally adding useful code to the library and common models. Then any code that was thought to be beneficial to the main framework could be merged back into the root. I guess I would end up with a directory struct like:
- /root/framework/
- /root/project-1/
- /root/project-2/
- /root/project-n/
etc…
How does all this sound?
Am I on the right track?
yes, you are. If you create your repository with the standard naming convention of 3 top-level directories ‘trunk’, ‘tags’ and ‘branches’ then you should put all your work in the branches folder, your released to live projects under tags, and your ‘core’ in-progress development under trunk.
Read the redbook, especially the section on repository organisation.