
Answer-first summary for fast verification
Answer: Create a new branch within Databricks Repos, commit the local modifications, and push the new branch to the remote Git repository.
The correct workflow in Databricks Repos when a user lacks permission to commit to the default branch (such as `main`) is to create a new branch. Once the changes are committed and pushed to this new branch on the remote Git provider, the developer can then use the Git provider's interface (e.g., GitHub or Azure DevOps) to open a pull request. This ensures code is reviewed and integrated safely without violating branch protections. **Why other options are incorrect:** - **A:** Sending a diff log is not a standard or safe collaboration workflow for shared repositories. - **B:** Pushing to an existing branch identified during a fetch is risky as it may overwrite another contributor's active work. - **D:** Databricks Repos does not support the creation of forks from within its UI; forks must be created on the Git provider's website. - **E:** If the developer lacks permissions to the branch, they will be unable to merge or push changes to it, even if done locally first.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A developer has successfully configured Databricks Repos and cloned a remote Git repository. However, they lack permissions to commit directly to the main branch, which is currently the only branch visible in the environment. Which strategy should the developer use to share their code updates without risking an overwrite of their colleagues' work?
A
Use Repos to fetch all modifications and share the git diff log with the team for manual review.
B
Utilize Repos to pull changes from the remote Git repository, then commit and push modifications to a branch that appeared during the fetch process.
C
Create a new branch within Databricks Repos, commit the local modifications, and push the new branch to the remote Git repository.
D
Initiate a fork of the remote repository directly from the Databricks Repos interface, execute the changes, and submit a pull request.
E
Merge all local discrepancies into the existing branch and then initiate a pull request to integrate changes into the remote repository.