CertSafari
    Databricks Certified Data Engineer Associate· Lessons

    Domain 5 · Lesson 21/33

    Branch, Commit, Push, and Open Pull Requests from Databricks Git Folders

    Manage your code development workflow within the Databricks workspace UI

    10 min read
    2.5% of exam
    4 sources
    Published 2 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Create a new branch from a chosen base branch in the Git dialog
    • Switch branches safely, knowing what happens to uncommitted changes and workspace assets
    • Commit and push changes to the remote repository from the workspace UI
    • Describe where pull requests are created and merged, and how merged code reaches production Git folders

    1.Creating a feature branch

    In a Databricks Git folder (a workspace clone of a remote Git repository), branch work happens in the Git dialog.

    The documented collaboration pattern starts with a branch. You create a feature branch from main in the Git folders UI, then do your edits there. Databricks recommends that each developer work on their own branch, and the dialog lets you choose any base branch for the new one.

    Checkpoint 1 of 7· Put it in order

    Put the steps for creating a new branch in a Git folder in order.

    1. 1.Enter a name for the new branch and select the base branch
    2. 2.Open the Git dialog
    3. 3.Click Create Branch
    4. 4.Click Create

    The 'own branch' recommendation has a concrete reason. The current branch belongs to the Git folder, not to each user. If other people have access to the same Git folder in the same workspace, changing the branch changes it for them too. That's why the documented user flow has each developer create their own Git folder under /Workspace/Users/<email>/ and work on a user-specific branch there.

    Checkpoint 2 of 7· Exam question

    A data engineer wants to create a new branch called `feature/ingestion-fix` from `main` inside a Databricks Git folder, without leaving the workspace UI. What should they do?

    Sources12

    2.Switching branches and what comes with you

    You switch branches with the branch dropdown in the Git dialog. Uncommitted changes go with you as long as they don't conflict with code on the new branch. If you didn't mean to bring them along, discard them before or after the switch.

    Switching also changes workspace assets. If the new branch doesn't contain an asset, the switch can delete it. Switching back recreates the asset, but with new IDs and URLs, and that can't be undone. So if you shared or bookmarked assets from a Git folder, confirm they exist on the target branch before you switch. Notebooks lose state when their source code changes, and if you switch to a branch without a notebook, its MLflow experiment data can be lost for good unless you return to the old branch within 30 days.

    You can't delete a branch from the Git folders UI; you delete it in your Git provider. Even then, the local copy can stay in the Git folder for up to 30 days. The only way to remove it completely is to delete the repository.

    Checkpoint 3 of 7· Check yourself

    A dashboard link to a notebook in a Git folder is shared with stakeholders. You switch to a branch that lacks the notebook, then switch back. What is the state of the shared link?

    Sources23

    3.Committing and pushing from the Git dialog

    When your edits are ready, you commit and push in one place. In the Git dialog, open the Changes tab and make sure the files you want are selected. Enter a commit message, which is required, plus an optional description. You can compare diffs visually before committing. Then click Commit & Push. That one button commits your work to the working branch and pushes the updated branch to the remote repository, so the dialog has no separate local-commit step.

    The commit carries the identity from your Git credential. The credential's email becomes the author and committer email, which is how the provider credits you. Only Git folders with the Public Preview Git CLI access can stage several commits locally before pushing, from a notebook, the web terminal, or Genie Code. In a CLI-enabled folder, the UI's pull, push, and commit run on serverless compute.

    Keep two warnings apart. Uncommitted edits that don't conflict follow you when you switch branches. The asset-deletion warning is a different risk: a switch can delete workspace assets that the target branch doesn't contain.

    Checkpoint 4 of 7· Check yourself

    Which of these Git operations can cause a notebook in a Git folder to lose its cell outputs and widgets?

    What goes into the commit depends on the notebook format. Databricks source format notebooks don't store dashboard information. To preserve dashboards, change the notebook format to .ipynb (Jupyter format), which supports dashboard and visualization definitions by default. To preserve visualization data, commit the notebook with outputs.

    Checkpoint 5 of 7· Exam question

    A developer working in a Databricks Git folder has several new notebooks that exist only on the current branch and have never been committed. They check out a different branch that does not contain these notebooks. What happens to the uncommitted notebooks?

    Checkpoint 6 of 7· Exam question

    A data engineer runs a notebook in a Databricks Git folder, producing table previews and plots, then uses Commit & Push to publish the notebook to the remote repository. A teammate later clones the repository outside Databricks and opens the notebook file. What should the engineer expect regarding the plots and table previews?

    Sources243

    4.Pull requests: the hand-off to your Git provider

    In Databricks' CI/CD guidance, the pull request belongs to the merge flow. After pushing from a Git folder, users open pull requests, and the documented place to do that is the Git provider. In the walkthrough, after Commit & Push the Git dialog shows a banner with a pull request link that takes you to your provider to create the pull request. Git folders can merge branches themselves (it's in the kebab menu), but the reviewed route is to create the pull request and merge it through your provider.

    Checkpoint 7 of 7· Put it in order

    Put the documented feature-branch collaboration workflow in order.

    1. 1.Clone the existing Git repository into your Databricks workspace
    2. 2.Merge the PR into the deployment branch
    3. 3.Create a PR on your Git provider and review it with your team
    4. 4.Edit notebooks and other files in the Git folder
    5. 5.Commit and push your changes to the remote repository
    6. 6.In the Git folders UI, create a feature branch from main

    Merged code doesn't flow into your personal Git folder. It goes to a production Git folder. An admin creates that folder outside the user folders, checked out to a deployment branch, and it serves as the source for automated workflows. Most users get Can Run on it, and only admins and service principals can edit it. Automation updates it when PRs merge, for example a GitHub Actions workflow or a scheduled job that calls the Repos API. Developers never push there by hand. Their part ends when the PR is merged.

    Sources14

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Switching branches in a Git folder throws away your uncommitted edits.Why is that wrong?

      Uncommitted changes that don't conflict carry over to the new branch. You have to discard them yourself if you don't want them there.

      Covered in Switching branches and what comes with you

    2. 2.You can delete an obsolete branch from the Git dialog.Why is that wrong?

      You delete branches in the Git provider. Even then, the local branch can stay in the Git folder for up to 30 days.

      Covered in Switching branches and what comes with you

    3. 3.Pull requests are opened and reviewed inside the Databricks Git dialog.Why is that wrong?

      The documented workflow pushes from the Git folder, then creates, reviews, and merges the PR on your Git provider.

      Covered in Pull requests: the hand-off to your Git provider

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Databricks recommends that each developer work on their own branch.”
      ↩︎ Creating a feature branch
      “Merge flow: After pushing from a Git folder, users open pull requests (PRs).”
      ↩︎ Pull requests: the hand-off to your Git provider
      “They should be updated only by automation when PRs are merged into deployment branches.”
      ↩︎ Pull requests: the hand-off to your Git provider
      “When ready, create a PR on your Git provider, review with your team, and merge into the deployment branch.”
      ↩︎ Prediction
      “In the Git folders UI, create a feature branch from the main branch.”
      ↩︎ Checkpoint
    2. 2.
      “changing the branch also changes the branch for them if they share the same workspace.”
      ↩︎ Creating a feature branch
      “Switching branches might delete workspace assets when the new branch doesn't contain these assets.”
      ↩︎ Switching branches and what comes with you
      “can remain present in the associated Git folder for up to 30 days after you delete the remote branch”
      ↩︎ Switching branches and what comes with you
      “Commit your work to the working branch and push the updated branch to the remote Git repository.”
      ↩︎ Committing and pushing from the Git dialog
      “Add a commit message and optional expanded description for your changes.”
      ↩︎ Committing and pushing from the Git dialog
      “Uncommitted changes on the current branch carry over and show as uncommitted changes on the new branch”
      ↩︎ Exam trap 1
      “Enter a name for the new branch and select the base branch.”
      ↩︎ Checkpoint
      “Uncommitted changes on the current branch carry over and show as uncommitted changes on the new branch”
      ↩︎ Prediction
      “Switching back to the current branch recreates the deleted assets with new IDs and URLs. This change can't be reversed.”
      ↩︎ Checkpoint
    3. 3.
      “Switching to a branch that doesn't contain the notebook risks losing the associated MLflow experiment data.”
      ↩︎ Switching branches and what comes with you
      “git pull can change notebook source code, requiring Git folders to overwrite the existing notebook.”
      ↩︎ Committing and pushing from the Git dialog
      “To preserve visualization data, commit the notebook with outputs.”
      ↩︎ Committing and pushing from the Git dialog
      “To delete a branch, you must work in your Git provider.”
      ↩︎ Exam trap 2
      “You can also create a pull request and merge through your Git provider.”
      ↩︎ Exam trap 3
      “Operations like git commit, push, or creating a new branch don't affect source code and preserve notebook state.”
      ↩︎ Checkpoint
    4. 4.
      “For Commit message (required), enter Updated comment.”
      ↩︎ Committing and pushing from the Git dialog
      “Click the pull request link in Create a pull request on your git provider in the banner”
      ↩︎ Pull requests: the hand-off to your Git provider

    Spotted a mistake, or was something unclear? Tell us.