Git Workflow
Diagram
Outline
-
Clone Your Git Repository: In your Databricks workspace, clone the remote repository to create a local version in your user folder.
-
Create a Feature Branch: Use the Repos UI to create a new feature branch from the main branch. This is where you'll make your modifications.
-
Regular Development: Make changes to Azure Databricks notebooks and other files in your feature branch. Regularly commit these changes.
-
Pull Latest Changes from Main Branch: Regularly pull the latest changes from the main branch to your feature branch to stay updated. This helps in reducing the chances of conflicts.
- In Azure Databricks, checkout your project branch
- Select Rebase from the menu
- Choose the
main
branch - Click
Begin Rebase
-
Resolve Conflicts: If a merge conflict occurs, manually resolve it by editing the conflicting files. Databricks provides UI tools to help identify and resolve these conflicts.
- Databricks will display all files with conflicting changes.
- Review these changes and determine the best way to resolve the conflict.
- Either manually edit the files and mark the conflicts as resolved, or use the drop down to accept all existing or all incoming changes if appropriate.
- Click
Continue Rebase
-
Push Changes: Once your feature is complete and all conflicts are resolved, push your changes back to your branch in the remote repository.
-
Merge to Main Branch: Once your code is complete, create a pull request to merge your feature branch into the main branch. Resolve any conflicts that might arise during this process.
-
Final Merge: After resolving all conflicts and getting the necessary approvals, merge your feature branch into the main branch.