2013-05-17

Switching from CVS to GIT (Part 1)

Intro

I'm part of a team that works on a web application created in the middle of the last decade. It's very successful, in terms of "it's making money". We currently use CVS, and the development process is built around that.

The problem

What annoys me most, is you have to check in to test your changes (and testing means "open in browser", I'll cover that later). Other annoying things include:

  • Code QA is done based on file revisions
    I hacked a tool to get changes for a user in a given time frame, to create those QA docs, but this is still error prone due to not doing one story at a time
  • No branching
    I've read that branching in CVS is a real pain. I even don't know how to do it properly. Additionally, even when we would use branches, there would be no testing enviroment, since the dev-server's auto deploy only works on HEAD. There's other problems with that too, since we need more than a dozen Apache vhosts for every branch (explaining that would go too far here)
Not for the first time, I'm thinking about how to convince the team to switch to git.

If we use git the way we currently use cvs, it's pointless. We would still bloat the version control with many unneeded check-ins. To make thinks even worse, there's no invrementing version number in git, so it's harder to track changes in a single file. There would be still no branching, since the central dev-server still can only serve one branch due to the multi-vhost problem.

So I think we have to change the development process in general, and use git the way it's meant to: Every developer has his own (set of) VMs where he could develop and test on. When development of a particular item is finished, he pushes that changeset to the central git repo, where it gets merged into the development branch of our application. The dev-server would still serve the current dev branch.

That imposes the next problem: Our application isn't easy to set up - even a skilled admin would need 2-3 days to deploy it to a fresh server.

Conclusion

It's not exactly easy to switch to git for us. In the next post I'll show some real code and possible steps to take for making a rather big PHPapplication easier to deploy.

No comments:

Post a Comment