Skip to main content
All CollectionsBubble FeaturesVersion Control
Version Control - Merging Custom Branches
Version Control - Merging Custom Branches

Learn how to merge Custom Branches using Version Control in Bubble.

Updated over 5 months ago

Transcript

Merging branches allows you to add the changes you've made from one branch of your app to another. You can merge the changes from a parent branch into a child branch, or from a child branch into a parent branch. Regardless of where you are in your hierarchy, merging takes any changes created in one branch (the Source branch) and integrates them into the other branch (the Base branch).

A merge is always started from the Base branch. The first step of the merge flow is to select the Base branch you want to merge changes into, and then select the Source branch that contains the changes you want to integrate. Bubble will create an automatic savepoint in the Base branch before and after the merge is performed. But, it's also a good practice to create a manual savepoint before the merge in the Source Branch as well.

Let's see this in action. Let's say that in your app, you created a custom branch off of a parent branch so that you could focus on building a new "Payments" page. Then, let's say that you're happy with the changes you've made and are ready to merge up to your parent branch. So first, since that would be your Source branch, you'll create a savepoint ahead of your merge. Next, under the Overview tab in the Version Control side-panel, you'd go to the parent branch, which is your Base branch, and select "Merge changes from another branch." You'll then select your child branch as the Source.

Once you've selected your Source branch, you've completed step one! In step two of the merge process, you'll review the changes you're adding, and if you click on a particular change, you can preview that change in the Editor. This holds true for changes across multiple pages, or even changes in other tabs, like Workflow or Styles.

Ultimately, when you're ready, you can confirm the changes and continue the process to step 3, where you can resolve conflicting changes if any exist. Then, you'll continue again and complete the merge.

Now let's take a look at how you might want to approach merging a little differently while working with active collaborators in the same app. For this example, let's say you have another child branch in which you're working on changes to a button. While you're doing that, it's possible you may have team members working on other changes in the parent branch. So just in case your new change might be incompatible with their changes in some way, you can first merge the changes from the parent branch into your child branch. That way, if there are any updates to the app your team has made in the parent branch that you don't yet have in your branch, you can resolve that and make sure your child branch is as up to date with the parent as possible before you add in your own changes back up the tree.

Additionally, if there are any conflicting changes between both branches, you can focus on resolving them there in your child branch without interrupting the rest of their work! This is a lower risk way to truly test that everything is working well on your end of the tree before merging back up the hierarchy. (To learn more, check out our Version Control tutorial on Conflicts.)

Did this answer your question?