A feature branch is a copy of the main codebase where an individual or team of software developers can work on a new feature until it is complete.
With many engineers working in the same code-base, it's important to have a strategy for how individuals work together. To avoid overriding each other's changes, engineers create their own copy of the codebase, called branches. Following an analogy of a tree, the master branch is sometimes called the trunk. The process of incorporating the changes of an individual's copy into the main master trunk is called merging.
In feature branch development, individual engineers or teams of engineers do not merge their branch until a feature is complete, sometimes working for weeks or months at a time on a separate copy. This long stretch of time can make the process of merging difficult because the trunk or master has likely changed due to other engineers merging their branches. This is known as a merge conflict.
Feature branch development and merging source code is handled in version control software such as Git and Github. The main branch and feature branches live in this code repository (or repo) and developers checkout code to create a new branch to work from.
Once the changes are made to the code, the developer makes what is known as a pull request, or a request to have other developers on the team do a code review to ensure that the local branch does not have any errors, and also that it will not cause any errors when merged into the main branch. Once a branch has been thoroughly reviewed, it can then be merged into the main branch.
Feature branch development is one method of managing many engineers working off of the same codebase. Modern teams often rely on continuous integration and trunk-based development to avoid issues with bug fixes and merge conflicts that arise from the branching model of code development.
One alternative to the feature branch workflow is continuous integration, which is a software development methodology which involves continuously integrated new code changes into the mainline or trunk rather than waiting until a new feature branch has been under development for weeks or months and has diverged from the main branch.
Continuous integration, also known as trunk-based development helps to minimize merge conflicts by continually merging changes into a single source to prevent feature branching. Continuous integration, along with practices such as feature flagging can help developers to deploy code faster with less time spent trying to reconcile different versions of code.
Evaluating and making sure your potential partner delivers the right progressive delivery and experimentation platform can be difficult. Download this free template to evaluate the quality of platforms and make sure they deliver exactly what you need.
This report helps B2B marketers look beyond the typical first- or third-party distinction to understand the significant differences in how data is sourced and refined.
We’ve analyzed over 100,000 revenue-boosting digital experiments to understand the science of driving real growth
Get started creating digital experiences that transform your company
An error has occurred
You can get the very best of Optimizely without spending a dime.Try it out for 30 days, on us.
Hang tight! We're creating your account and password instructions are headed to your inbox.
Please correct form errors
Start releasing products smarter with feature flags and rollouts. Prove value with A/B testing. Built on our Full Stack platform.
Welcome, we're creating your account...