Databricks Certified Data Engineer Professional — Question 145
A developer has successfully configured their credentials for Databricks Repos and cloned a remote Git repository. They do not have privileges to make changes to the main branch, which is the only branch currently visible in their workspace.
Which approach allows this user to share their code updates without the risk of overwriting the work of their teammates?
Answer options
- A. Use Repos to create a new branch, commit all changes, and push changes to the remote Git repository.
- B. Use Repos to create a fork of the remote repository, commit all changes, and make a pull request on the source repository.
- C. Use Repos to pull changes from the remote Git repository; commit and push changes to a branch that appeared as changes were pulled.
- D. Use Repos to merge all differences and make a pull request back to the remote repository.
Correct answer: A
Explanation
The correct answer is A because creating a new branch allows the developer to make changes without affecting the main branch, thus preventing any overwriting of teammates' work. Option B is incorrect since forking is typically used when significant changes are anticipated, and the user can work within the same repository. Option C is wrong because pulling changes does not allow for independent modifications without affecting the main branch. Option D is not suitable as merging implies altering the main branch directly, which the user cannot do.