Switching Branches using code in notebooks?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2026 09:39 AM
Hi,
I’m working on a project in a Databricks notebook and I’m trying to implement the following workflow:
- Create a new branch from Python code
- In the next cell, switch the notebook to that newly created branch
I’m able to create the branch without issues, but attempting to switch to it results in errors. Has anyone implemented something similar or found a reliable method to handle the branch switch from within a notebook?