Eliminate Merge Nightmares with Git Essentials: Part Two


In part one of the Eliminate Merge Nightmares with Git Essentials post, we presented a scenario in which I just realized that because of my teams branching and merging strategy (or lack thereof) the timeline for my project deliverable was in jeopardy. In part two of the series, we will go more in depth about the automated branch merging schemes available with Git Essentials and how this functionality can help reduce the chances of you and your team having to confront such a scenario ever again!

Merge Hell? Never Again!

One of the primary reasons for working in an isolated branch is to ensure that none of the code for the feature(s) we are currently working on get into the mainline branch until the new feature(s) are in a deliverable state. As we witnessed in the problematic merge scenario discussed in part one of the post, this puts us at risk of potential headaches when we eventually merge our completed changes back into the mainline branch. With Git Essentials’ continuous integration and delivery tool, the potential for these merge issues are drastically reduced by using Bamboo’s built in automated merge features.

Branch Updater

When working in an isolated branch, development work does not stop on the mainline (master) branch. Every code change made by other project teams into the mainline branch or code changes committed to the isolated branch contribute to divergence between the two branches. Bamboo has a built in automated branch merging scheme called Branch Updater that seeks to eliminate the risk of such code divergence for the teams working within the isolated branchs.

As you can see from the Branch Updater diagram (Fig. 1), any changes made from within the mainline (master) branch will get picked up by Bamboo and automatically merged into the isolated branch in order to keep the isolated branch from diverging from the mainline, yet keeping the changes from within the isolated branch from making it back into the mainline branch until the feature set is completed. Optionally, the changes just get built together without any actual push occurring on success.

With the Branch Updater automated merge scheme activated for your branches, have confidence in knowing that you will get immediate feedback when a new change in the mainline doesn’t work so well in your isolated branch so you can begin to do something about it now instead of later. You’ll never again get that sinking feeling when pushing your isolated branch back to the mainline at the end of a project when a whole slew of merge issues present themselves.

You have better things to be doing with your time then figuring out how to fit your teams new changes back into the mainline at that stage of the project anyways don’t you?

Fig. 1

Fig. 1


While the Branch Updater automated merge scheme is great for keeping your isolated branch up to date and effectively reducing the potential for downstream merge conflicts, the Gatekeeper automated merge scheme (Fig. 2) is a great way to keep the mainline branch updated with successfully built code changes made from your isolated development branch.

Whenever changes are committed to the isolated branch, Bamboo will combine these changes with the current mainline code base and attempt an automated build and test sequence. Optionally, if the sequence passes without any failures, the new changes committed to the isolated branch will be officially pushed into the mainline branch.

This automated branching scheme is very valuable when there are numerous development teams working in isolation off of the mainline (or development) branch. All successful code commits will immediately become available for any project teams who are using the Branch Updater scheme. This allows all teams to get immediate notification when there are any code compatibility issues.

The best way to use this automated merge scheme is when your team is working under a Test Driven Development methodology. Having the tests defined up front will ensure that the isolated changes do not get pushed back to the parent branch until a set number of tests are passing. After all, there was a reason for us to be working in isolation to begin with right?

Fig. 2

Fig. 2

How Do I Get Started With Git Essentials?

With all of these key features built into the Atlassian Git Essentials product it’s a no brainer to get started now to immediately start improving your development team’s daily operational efficiency. Contact the Atlassian Experts at Avant today to get set up with these industry leading tools or for a more in depth demonstration on how these tools can be leveraged within your company to increase confidence in timelines and overall throughput for all of your software projects.


Browse the case_studies archive. Bookmark the permalink.