Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are some best practices for maintaining multiple versions of a project?

I've got a project where we're rolling out v1, and beginning work on v2. I'm afraid that we're going to see bug fixes and minor feature changes to v1 over the next few months, some of which we're going to need to roll into v2, some of which we're going to need to keep separate. (We need to maintain v1's major feature set, but fix any bugs as they're found.)

We're using SVN at the moment. I've considered switching to Git, but I'm a little reluctant to change tools. Aside from that possibility, what are some general strategies and best practices to make managing this situation as easy as possible?

Update: everyone's suggesting I branch the code in Subversion. That was so obvious to me that I thought it was implied by the "we're using SVN" statement. Apparently not. :) I am going to look at Mercurial and Bazaar as well as Git, though. Anything else?

like image 345
sprugman Avatar asked May 13 '09 17:05

sprugman


People also ask

What is your strategy for keeping multiple projects on track simultaneously?

You can use a multi-project planner to help you keep track of everything that's going on. This can be especially helpful if you're working on multiple projects simultaneously. Adjusting your plan regularly lets you stay on top of projects and get things done more efficiently.


1 Answers

Using SVN, the best you can do is branch your repository:

  • In the trunk, keep the latest version - not necessarily a stable one.
  • Whenever you need to separate a new major version from there, branch to, say, 2.0 and you can keep both latest version and stable versions in the same repo.
  • If you find changes in branch 2.0 that need to be merged into the trunk, you can do it seamlessly.
like image 176
Seb Avatar answered Sep 21 '22 12:09

Seb