Branching Advantages – Benefits for Solo Developers

branchingsolo-developmentversion control

First off, I am aware that many questions have been asked about VCS as a solo developer, but they are often too broad. This concerns only branching, and still it has been marked as a duplicate…the supposed duplicate is, again, marked as another duplicate of another question that is too broad and doesn't concern branching specifically. That's how my question's unique.

What are the advantages, if any, of using branching as a solo developer? I've often seen it recommended even in a solo-dev context, but as far as I can see, beyond using a 'master' trunk for development, and branching off for working, release-ready code, I don't see how I could harness the power of branching (for example, to compartmentalize new features) without over-complicating the whole development process.

Best Answer

The advantages are mostly the same as for groups of developers. By using an always release-ready master branch, and feature branches for developing new features, you can always release off the master. Find an important bug while working on a feature? Switch branch, fix, release, switch back and continue developing.

Or maybe this is a hobby project and you just like being able to work a bit on this feature and a bit of that, as the mood strikes you. You're basically emulating a multiple-person team by time-slicing.

The implicit branching that DVCSs do on clones means that formal branches on the authoritative repository are less about coordinating people and more about coordinating development directions, and even a single person can do multiple of those.