Embracing Mainline Development: Beyond Feature Branches

In software development, processes are as varied as the people involved. I recently embarked on an exploration of mainline development, a strategy where developers commit directly to the main branch, sidestepping feature branches. Here’s what I learned on a team of two where we embraced this unconventional approach.

The Good

First, let’s talk about what makes mainline development worth exploring.

1. Better Commit Hygiene. Mainline development promotes cleaner commits. Each commit becomes a bite-sized piece of work that directly impacts the team. This not only ensures that I’m considerate of what I push but also prompts me to commit more frequently. Knowing the team might rely on my updates, there’s no room for stale feature branches.

2. Amplified Communication. With the constant flow of code, our team was naturally inclined to increase communication about what was being pushed and when. This transparent dialogue became invaluable in ensuring everyone was aligned and in sync.

3. Streamlined Workflow. Say goodbye to the overhead of branching! I’ve been on teams where a Jira story led to a branch, and while it’s manageable, the simplicity of committing directly to main was refreshing.

4. Higher Accountability. Direct commits mean my code directly influences my coworkers, fostering a sense of responsibility. I’ve always found myself more productive when held to higher standards, and this was no exception.

5. Instant Deployments. Pushing on main resulted in automatic deployments to both prod and dev. While this added a sense of urgency, there was an undeniable thrill in seeing code go “straight to prod.”

6. Optional Feature Branching. If necessary, we could still create a feature branch. This gave us the best of both worlds: the efficiency of mainline development and the flexibility of branching when needed.

The Challenges

Mainline development might not be right for every situation, though. Here are the downsides.

1. Overlapping Work. Without isolation, it took more effort to coordinate tasks and ensure we weren’t stepping on each other’s toes.

2. Continuous Live Updates. With every push updating the live site, there was an underlying stress. The ever-present possibility of a client accessing our work-in-progress nudged us to maintain a polished presentation.

In Conclusion

Mainline development might not be everyone’s cup of tea, but, in the right setting – especially with smaller teams – it’s an approach worth considering. For me, it was a positive experience that redefined how I view software development processes.

 
Conversation

Join the conversation

Your email address will not be published. Required fields are marked *