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?
You can clone a public repository without a credential. Any write, including a push to a public repository, needs a PAT or an OAuth link with write permission. Git folders connect over HTTPS only, not SSH.
“To modify a public remote repository or to work with private repositories, configure Git credentials with Write permissions.”Source: docs.databricks.com
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.
| Field | What you enter |
|---|---|
| Git repository URL | The HTTPS URL of the repo, e.g. https://example.com/organization/project.git |
| Git provider | The provider hosting the repository |
| Git folder name | The name of the workspace folder that holds the cloned contents |
| Sparse checkout mode | Whether 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
In the kebab (three-dot) menu of the Git dialog. The main view shows only the everyday controls: branch selector, Create Branch, Pull, and the commit message with Commit & Push.
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?
Cloning needs two things: a configured Git credential and CAN MANAGE permission on the parent folder. The credential is already valid, so the missing folder permission is what blocks the clone. Git folders aren't limited to /Workspace/Repos, and you can clone without write scope.
“You must have CAN MANAGE permission on the parent folder where you want to create the Git folder.”Source: docs.databricks.com
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.
| Action | Recoverable? |
|---|---|
| Switch branches with the Git folder dialog | Yes, from the remote Git repo |
| Discard a new file with the Git folder dialog | Yes, from the Trash folder |
| Discard a modified file with the Git folder dialog | No, the file is gone |
| reset (hard) for uncommitted file modifications | No, 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.
A branch switch can only be undone from what already exists on the remote. A discarded new file goes to the Trash. Discarding changes to an existing file can't be undone, so commit and push any work you want to keep.
“Discard a modified file with the Git folder dialog | No, the file is gone”Source: docs.databricks.com
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?
Correct answer: B — Open the Git dialog for the Git folder, select Create Branch, enter the branch name, choose main as the base branch, and click Create.
- A. Revision history restores earlier saved versions of a single notebook; it has no connection to Git and cannot create a Git branch.
- B. The Git dialog's Create Branch action lets a user name a new branch, pick a base branch such as main, and confirm creation directly in the workspace UI.
- C. Cloning a Git folder checks out the repository's existing default branch; it does not invent a new branch from a folder's display name.
- D. The bundle configuration file governs deployment targets for Lakeflow Jobs and pipelines, not Git branch creation, and
bundle deploydoes not touch branches.
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?
Correct answer: A — Databricks may delete the uncommitted notebooks from the workspace because the target branch does not contain matching files.
- A. Switching branches in a Git folder can remove workspace assets that the newly checked-out branch does not track, which includes notebooks that were never committed.
- B. There is no automatic stash-and-reapply mechanism for branch switches; uncommitted files are not silently preserved and restored this way.
- C. Databricks does not force a commit or discard before switching branches; uncommitted changes are carried over when they don't conflict, and can be lost when the target branch lacks the files.
- D. No scratch-folder safety net exists for uncommitted work in a Git folder; files that aren't committed are exposed to the branch-switch behavior described above.
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?
A pull that changes a notebook's source makes Databricks overwrite the notebook, and that wipes its outputs, comments, version history and widgets. Commit, push and creating a branch don't touch the source code, so the notebook keeps its state.
“git pull can change notebook source code, requiring Git folders to overwrite the existing notebook.”Source: docs.databricks.com
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?
Correct answer: C — The plots and table previews will not appear, because notebook outputs are not included in commits when notebooks are saved as source files.
- A. Databricks does not embed rendered cell output into a notebook saved in source format, so the claim of automatic, faithful output embedding is incorrect.
- B. Commit & Push does not create separate binary attachment files for outputs; the commit contains only the source representation of the notebook.
- C. When notebooks are stored in source file formats, execution outputs such as plots and table previews are excluded from what gets committed, so the teammate won't see them.
- D. Exporting to
.dbcis a separate archive format and is not part of the normal Commit & Push workflow, so it does not change what gets pushed to the remote branch.
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.Have the team review the pull request in the provider, then merge it into the deployment branch
- 2.In the Git dialog, create a feature branch with main as the base branch
- 3.Clone the remote repository into a Git folder under your own user folder
- 4.Edit notebooks and files, select the changes, and click Commit & Push
- 5.Follow the banner's link to your Git provider and open a pull request there
Branching, committing and pushing happen in the Git folder. Once the branch is pushed, the Databricks banner links you to the Git provider. The pull request is created, reviewed and merged there, not in the Git dialog.
“When ready, create a PR on your Git provider, review with your team, and merge into the deployment branch.”Source: docs.databricks.com
Sources
(9)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Repos are now called Git folders.”
↩︎ Git folders and the credential they need“Git folders require a remote repository URL.”
↩︎ Git folders and the credential they need - 2.https://docs.databricks.com/aws/en/repos/repos-setupOfficial docs
“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.https://docs.databricks.com/aws/en/repos/limitsOfficial docs
“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.
“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.https://docs.databricks.com/aws/en/repos/ci-cdOfficial docs
“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.
“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.
“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
“Databricks Git folders is a visual Git client and API that integrates Git repositories within your workspace.”
↩︎ Key concept“Discard a modified file with the Git folder dialog | No, the file is gone”
↩︎ Checkpoint