Further Thoughts on Git and Rails
The idea of replacing (or augmenting) Subversion with Git in the development practice is quite fascinating. It’s a part of an agile development methodology to respond to client feedback and changes of mind quickly. Sometimes they ask for a small change that has to go before that monstrous feature you are already working for quite a while, and it hammers on the head. What on Earth do I need to do now? Roll everything back, apply a change, deploy and then paste my changes back and move on? That’s fine once, twice, but hey when it’s a habit… It’s a reality and this is how it is most of the time in development, in real life, everywhere.
Because of its ridiculously expensive and slow nature in a centralized version control environments, branching was always considered as a no-no for such “stupid” applications. You use branches for a Real Job only and, yes, never check in until it’s fully tested!
With the distributed version control things change dramatically. I still have very little experience with Git, but several resources I discovered today gave a lot of food for thought.
- It’s no longer a taboo to fork a branch for an experimental feature, a quick test, a bug fix to be tested independently and merged later, for literally anything you may need to do with sources
- It’s cheap to create, cheap to maintain and easy as it never was before to merge back
- You check in, check in and check in like crazy to your private branch and no one cares until you push (or they pull) your changes to the trunk (master)
- You can use both Subversion for the centralized code versioning and Git for your local development until the global migration of the project to Git is finally discussed and performed (it’s inevitable, calm down)
- Finally, Capistrano works with Git as well as it does with Subversion / CVS and your Rails development is still in good hands
Here’s a couple of resources for your reading and watching pleasure. I found both intriguing and invaluable at the same time.
The last one could be two times shorter, but still is well-put and leaves a pleasant aftertaste.
Enjoy your weekend!