Course contentsShow
← Software Engineering
Lesson 87 of 1,9332. Version Control with GitFree lesson

Release Branching vs Continuous Deployment

Comparing strategies for managing releases through long-lived branches versus deploying every merge to production.

Release Branching vs Continuous Deployment

You'll learn: How two fundamentally different approaches handle getting code from developers to production—holding changes in a release branch versus deploying immediately after every merge.

The Two Philosophies

At this point in your journey, you've seen several branching strategies. Now it's time to understand the core tension they address: when do you actually ship code to users?

Release Branching creates a dedicated branch (like Git Flow's release branches) where code is prepared, tested, and polished before deployment. Think of it like a staging area at a theater—actors rehearse, props are checked, and only when everything's perfect does the curtain rise for the audience.

Continuous Deployment takes the opposite approach: every merge to the main branch automatically deploys to production. It's like a live TV broadcast—what you create goes immediately to viewers.

The Trade-offs

Release branches give you control and coordination. You can batch features together, run extended testing, and choose exactly when to release. The downside? Code sits waiting in branches, merge conflicts accumulate, and feedback from real users comes late.

Continuous deployment provides fast feedback and simplicity. Users see changes within minutes, and your main branch always reflects production. The catch? You need robust automated testing, feature flags to hide incomplete work, and a culture comfortable with frequent small changes.

Git Flow and GitLab Flow use release branching. GitHub Flow and Trunk-Based Development favor continuous deployment (or at least continuous delivery—ready to deploy anytime).

Key Takeaway: Release branching optimizes for coordinated, tested releases with delayed deployment; continuous deployment optimizes for speed-to-user and keeping your repository aligned with production reality.