CertSafari
    Databricks Certified Data Engineer Associate· Lessons

    Domain 5 · Lesson 21/33

    Git folders in the Databricks workspace: branch, commit, push and pull requests

    Manage your code development workflow within the Databricks workspace UI, including creating and switching between branches in Databricks Git folders (formerly Databricks Repos), committing and pushing changes, and creating pull requests using Databricks Git integration

    15 min read
    2.5% of exam
    9 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Connect a Git provider to Databricks with a credential that can write, and clone a repository into a Git folder
    • Open the Git dialog from a notebook or the workspace browser and find each Git operation in it
    • Create a feature branch from a chosen base branch and switch branches without losing uncommitted work
    • Commit and push changes, and predict what a commit does and does not contain for source-format notebooks
    • Open a pull request in the Git provider after pushing a branch from a Git folder

    Key concept

    Git folder — A workspace folder that is a clone of a remote Git repository, with one branch checked out at a time. You run every day-to-day Git step on it (branch, commit, push, pull) from the Git dialog in the workspace UI. The review and merge of a pull request happen in the Git provider.

    1.Git folders and the credential they need

    A Git folder lets you keep notebooks and files under version control without leaving the workspace. It clones a remote repository, tracks your changes, and lets you clone, commit, push, pull, manage branches and compare diffs from the UI. Older material calls the feature Repos. Only the name changed: the menu entry that used to read New > Repo now reads New > Git folder. One real difference is that a Git folder always needs a remote repository URL.

    The repository lives with a Git provider such as GitHub, GitLab, Azure DevOps, Bitbucket or AWS CodeCommit, and Databricks needs a credential to talk to it. Without one you can still clone a public repository, but you cannot push to it. Private repositories, and any write such as a push, need a personal access token (PAT) or an OAuth link with write permission. To add one, click your username in the top bar, open Settings, choose Linked accounts, click Add Git credential, and pick the provider. Some providers offer OAuth linking, while others ask for your provider email and a PAT. Each user can store up to 10 Git credentials. The first one for a provider becomes the default, and each Git folder can be pointed at a specific credential.

    Fill in the email field. Databricks uses it as the author and committer email on every commit you make. If it is blank, Databricks uses your Git username as the email instead, and your commits may not show up on your provider profile. Two limits catch people coming from a laptop Git setup: Git folders connect over HTTPS only, not SSH, and they don't support GPG-signed commits.

    Checkpoint 1 of 8· Check yourself

    A data engineer has not added any Git credential. They create a Git folder from a public GitHub repository, edit a notebook, then click Commit & Push. What happens, and what do they need to do?

    Sources123

    2.Cloning a repository and opening the Git dialog

    Cloning requires CAN MANAGE permission on the parent folder, plus a configured Git credential. In the sidebar, open Workspace, browse to the folder that should hold the clone, and click Create > Git folder. The dialog asks for four things, and Databricks then copies the remote contents into the workspace. By convention, a developer's own Git folders go under their user folder in /Workspace/Users, and that is where they work on a user-specific branch.

    Fields in the Create Git folder dialog
    FieldWhat you enter
    Git repository URLThe HTTPS URL of the repo, e.g. https://example.com/organization/project.git
    Git providerThe provider hosting the repository
    Git folder nameThe name of the workspace folder that holds the cloned contents
    Sparse checkout modeWhether to clone only a subset of directories using a cone pattern, useful when the repo exceeds size limits

    After the clone, nearly every operation goes through the Git dialog. There are two ways to open it. In a notebook, click the button next to the notebook name, which shows the current branch. In the workspace browser, click Git beside the repo name. The dialog opens full screen, with these parts:

    • A branch selector showing your current working branch, which you also use to check out other branches
    • A Create Branch button
    • The files and subfolders on the current branch, along with your changes and the branch history
    • A Pull button, which brings in content from the remote repository
    • A commit message field with an optional longer description, plus Commit & Push
    • A kebab menu holding less common operations such as hard reset, merge and rebase

    Checkpoint 2 of 8· Check yourself

    Your Git credential is set up and valid. You try to create a Git folder inside a shared team folder in the workspace, and you get a permission error. What is the most likely cause?

    Sources45

    3.Creating and switching branches

    New work belongs on a feature branch, and you create it from the Git dialog. Open the dialog, click Create Branch, enter a name such as feature/ingestion-fix, select the base branch (usually main), and click Create. Databricks recommends that each developer work on their own branch. Notebook revision history, the folder's clone action and bundle files play no part in this: a branch is a Git object, made from the Git dialog.

    A Git folder has one checked-out branch, and everyone who uses that folder sees it. If other users in the same workspace can access your Git folder, changing its branch changes it for them too. Each developer cloning the repo into their own user folder avoids this.

    You switch branches with the branch dropdown, and it never asks you to commit first. What happens to your unsaved work then depends on which kind it is. Edits to a notebook or file that the new branch also has come along: they show up as uncommitted changes on the new branch, as long as they don't conflict with the code there. If you don't want them on the new branch, discard them before or after the switch. A notebook or file that exists on your current branch but not on the target is the risky case. The new branch has nothing to put in its place, so switching can delete that asset from the workspace. Switching back recreates it with new IDs and URLs, which breaks any links or bookmarks to the old ones, and this can't be undone. The safe habit is to commit work you want to keep before you switch. If you shared a notebook from the folder, check that it exists on the target branch first.

    Which Git folder actions leave a file recoverable
    ActionRecoverable?
    Switch branches with the Git folder dialogYes, from the remote Git repo
    Discard a new file with the Git folder dialogYes, from the Trash folder
    Discard a modified file with the Git folder dialogNo, the file is gone
    reset (hard) for uncommitted file modificationsNo, file modifications are gone

    In that table, recovery from the remote repo only works for something that was committed and pushed. A notebook that never left your workspace has no remote copy. You also can't delete branches from a Git folder: you delete them in the Git provider. Even then, the local copy of a branch can stay in the Git folder for up to 30 days after the remote branch is deleted.

    Checkpoint 3 of 8· Match them up

    You lose a notebook or your edits in a Git folder. Match each Git folder action to where, if anywhere, you can get the file back.

    Tap a term, then the definition that fits it.

    Checkpoint 4 of 8· 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?

    Checkpoint 5 of 8· 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?

    Sources453

    4.Committing and pushing changes

    In the Git dialog, committing and pushing are one action. When you add or edit notebooks or files, the Git folder UI highlights them as changes. Select the files you want, enter a commit message (required) and, if you like, a description, then click Commit & Push. The commit is made on your working branch, and that branch is pushed to the remote in the same step. To bring in changes others have pushed, use Pull.

    A commit carries the code, not the results. Commits of source-format notebooks (.py, .scala, .sql, .r) don't include outputs by default, and source format doesn't store dashboard information either. To keep visualizations under version control, use the IPYNB (Jupyter) format, which is now the default for new notebooks, and commit the notebook with its outputs. Committing outputs only works if a workspace administrator has turned that feature on.

    Commit and push are also safe for the notebook you have open. Commit, push and creating a branch leave the source code alone, so the notebook keeps its state. A pull that changes a notebook's source makes Databricks overwrite the notebook, and you lose its cell outputs, comments, version history and widgets. Pull before you've captured results you want to keep, and those results are gone.

    Checkpoint 6 of 8· Check yourself

    After running a notebook in your Git folder, you have cell outputs, comments and widget values you haven't saved anywhere else. Which Git dialog action could make you lose them?

    Checkpoint 7 of 8· 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?

    Sources436

    5.Opening a pull request in the Git provider

    A pull request is opened in the Git provider, not in Databricks. In a typical team workflow, you clone the repo, create a feature branch from main in the Git folder, edit notebooks and files, and commit and push. Then you open a PR on your provider, the team reviews it, and it is merged into the deployment branch. Each teammate follows the same steps in their own user folder, on their own branch.

    After a push, the Git dialog shows a banner with a Create a pull request on your git provider link. It takes you to the provider (GitHub, for example), where you create the PR, wait for checks, and merge. The same route applies when the default branch is protected: if you can't commit to it, create a new branch, push it, and use your provider's interface to create a pull request and merge it into the default branch. The Git dialog can merge branches through its kebab menu. Review and approval need a pull request in the provider.

    After the merge, that is the end of the Git folder's part. A common next step is automation that pulls the merged deployment branch into an admin-owned production Git folder, which only admins and service principals can edit. That automation is CI/CD tooling, not something a developer does in the Git dialog.

    Checkpoint 8 of 8· Put it in order

    Put the steps of a feature change in the order they happen, from a new Git folder to merged code on the deployment branch.

    1. 1.Have the team review the pull request in the provider, then merge it into the deployment branch
    2. 2.In the Git dialog, create a feature branch with main as the base branch
    3. 3.Clone the remote repository into a Git folder under your own user folder
    4. 4.Edit notebooks and files, select the changes, and click Commit & Push
    5. 5.Follow the banner's link to your Git provider and open a pull request there

    Sources5743

    Sources

    (9)

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

    1. 1.
    2. 2.
      “You can clone public remote repositories without Git credentials.”
      ↩︎ Git folders and the credential they need
      “For private repositories or write operations, you have a personal access token (PAT) or OAuth credentials from your Git provider.”
      ↩︎ Git folders and the credential they need
      “Click your username in the top bar of the Databricks workspace and select Settings.”
      ↩︎ Git folders and the credential they need
      “Each user can have a maximum of 10 Git credentials.”
      ↩︎ Git folders and the credential they need
      “If you don't specify an email address, Databricks uses your Git username as the email.”
      ↩︎ Git folders and the credential they need
      “Use Git folders for interactive development.”
      ↩︎ Git folders and the credential they need
      “To modify a public remote repository or to work with private repositories, configure Git credentials with Write permissions.”
      ↩︎ Checkpoint
    3. 3.
      “Git folders support only HTTPS, not SSH.”
      ↩︎ Git folders and the credential they need
      “To delete a branch, you must work in your Git provider.”
      ↩︎ Creating and switching branches
      “To preserve visualization data, commit the notebook with outputs.”
      ↩︎ Committing and pushing changes
      “Operations like git commit, push, or creating a new branch don't affect source code and preserve notebook state.”
      ↩︎ Committing and pushing changes
      “Git operations that alter notebook source code result in loss of notebook state, including cell outputs, comments, version history, and widgets.”
      ↩︎ Committing and pushing changes
      “Git folders support branch merging. You can also create a pull request and merge through your Git provider.”
      ↩︎ Opening a pull request in the Git provider
      “To delete a branch, you must work in your Git provider.”
      ↩︎ Exam trap 2
      “git pull can change notebook source code, requiring Git folders to overwrite the existing notebook.”
      ↩︎ Checkpoint
    4. 4.
      “You must have CAN MANAGE permission on the parent folder where you want to create the Git folder.”
      ↩︎ Cloning a repository and opening the Git dialog
      “From a notebook, click the button next to the notebook name that identifies the current Git branch.”
      ↩︎ Cloning a repository and opening the Git dialog
      “From the Databricks Git folders browser, click Git beside the repo name.”
      ↩︎ Cloning a repository and opening the Git dialog
      “Click the kebab menu to choose from additional Git branch operations, such as a hard reset, merge, or rebase.”
      ↩︎ Cloning a repository and opening the Git dialog
      “Enter a name for the new branch and select the base branch.”
      ↩︎ Creating and switching branches
      “changing the branch also changes the branch for them if they share the same workspace”
      ↩︎ Creating and switching branches
      “Uncommitted changes on the current branch carry over and show as uncommitted changes on the new branch”
      ↩︎ Creating and switching branches
      “Switching branches might delete workspace assets when the new branch doesn't contain these assets.”
      ↩︎ Creating and switching branches
      “can remain present in the associated Git folder for up to 30 days after you delete the remote branch”
      ↩︎ Creating and switching branches
      “When you add new notebooks or files, or make changes to existing notebooks or files, the Git folder UI highlights the changes.”
      ↩︎ Committing and pushing changes
      “Add a required commit message for the changes, and click Commit & Push to push the changes to the remote Git repository.”
      ↩︎ Committing and pushing changes
      “Notebook outputs aren't included in commits by default when notebooks are saved in source file formats (.py, .scala, .sql, .r).”
      ↩︎ Committing and pushing changes
      “use your Git provider's interface to create a pull request and merge it into the default branch.”
      ↩︎ Opening a pull request in the Git provider
      “Switching back to the current branch recreates the deleted assets with new IDs and URLs.”
      ↩︎ Exam trap 1
    5. 5.
      “A user creates a Git folder under /Workspace/Users/<email>/ from a remote repository, works on a user-specific branch, and pushes commits to the remote.”
      ↩︎ Cloning a repository and opening the Git dialog
      “Databricks recommends that each developer work on their own branch.”
      ↩︎ Creating and switching branches
      “When ready, create a PR on your Git provider, review with your team, and merge into the deployment branch.”
      ↩︎ Opening a pull request in the Git provider
      “Merge flow: After pushing from a Git folder, users open pull requests (PRs).”
      ↩︎ Opening a pull request in the Git provider
      “When ready, create a PR on your Git provider, review with your team, and merge into the deployment branch.”
      ↩︎ Exam trap 4
    6. 6.
      “IPYNB notebooks are the default format when creating a new notebook on Databricks.”
      ↩︎ Committing and pushing changes
      “Outputs can be committed only if a workspace administrator has enabled this feature.”
      ↩︎ Exam trap 3
    7. 7.
      “Click the pull request link in Create a pull request on your git provider in the banner”
      ↩︎ Opening a pull request in the Git provider

    Also cited

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