Skip to main content

Working with branches

In Modelbit, different Git branches allow you to work separately from your teammates. Even more importantly, they let you use your Git-based code review, approval, and merge workflows as part of pushing your work to the main branch.

You can create a new branch from the UI. In Modelbit, click the branch selector dropdown in the upper right corner of the app. Click "New Git Branch..." to create a branch and switch to it.

Use the same branch selector to switch between branches.

In the Python API, to work in a branch, run:

mb.switch_branch("my_branch")

At this point, all datasets, models and deployments will come from the my_branch branch. New deployments will deploy to the my_branch branch.

Setting your branch during login

You can set your branch during notebook login using the branch= parameter:

import modelbit
mb = modelbit.login(branch="my-branch")