Skip to main content
All CollectionsBubble FeaturesVersion Control
Version Control - Using the Hotfix Branch
Version Control - Using the Hotfix Branch

Learn how to use the Hotfix Branch with Version Control in Bubble.

Updated over 6 months ago

Transcript

The hotfix branch is a special type of branch that gives you the flexibility to make time-sensitive changes or urgent bug fixes.

In general, updating your app through custom branches is the best way to develop and implement changes to your app. But in some cases, you may need to incorporate an immediate change to Live. Instead of branching off of Main, the hotfix branch stems directly off of Live. It does, however, still live in the Development environment so your development database is used when testing changes. It is the only other type of branch aside from Main that can deploy changes to Live, after which the hotfix branch is automatically deleted.

Let's see an example of the hotfix branch in action. Here, imagine you're looking at the Live version of your app, and you've noticed an issue: one of the buttons should navigate to the "Sign Up" page, but instead, the workflow is taking you to the "Reset Password" page. Normally, you would create a new custom branch off of Main, fix the workflow, and then merge the change back into Main for deployment. However, let's say that your teammate merged some changes into Main that they don't want to deploy yet.

To get around this, you can create a temporary hotfix branch from Live using the "Create a hotfix" button. Just note: you can only have one hotfix branch in existence at any given point. Once you click on the "Create a hotfix" button, you'll be told that while a hotfix branch exists, deployment from Main will be blocked. In fact, you will then see the blocked icon on your app's Development environment.

You and your team can still work in your branches of the Development environment and can even still sync with Live, but until the hotfix branch is resolved, you can't deploy any of your updates from Main to Live.

Like any custom branch, you can also create a savepoint for your hotfix branch, or you can even delete it if you make a mistake. For now though, if you go ahead and correct the urgent bug, and then, once you're ready, you'd deploy this hotfix to your Live branch. Once that's done, the hotfix branch is automatically deleted and the Live version of your app is fixed. Simple as that!

Something to remember: once a hotfix branch has been deployed, the Live branch of your app will now be ahead of your Main branch. That's important to remember because you won't be allowed to deploy Main to Live if Main is out of sync with Live in any way. So, it's a good practice to sync Main with Live as soon as possible so you're free to deploy once more!

Did this answer your question?