Git
How to connect to external Git
Configure your user's Settings with a new Git
provider: enter Email
, Username
and Personal Access Token
, or simply Login with Github
.
The video below walks through connecting to an external Git provider:
Every user will have a Prophecy Managed
Git provider already created in their account. You can just use this if you don't want to store your code to an external Git.
Authorizing Prophecy Oauth App
If you are a member of a GitHub Organization, it's important to note that you may need to authorize our application to access your organization. This authorization step is necessary to ensure that our application can authenticate the APIs required to access the repositories.
To grant authorization, please follow the steps below:
- Go to the Authorized OAuth Apps settings page on GitHub.
- Look for our application named Prophecy in the list of authorized apps and click on the entry to view its details.
- On the application details page, you should see an option to grant access to your organizations. Enable the necessary organization access permissions to allow our application to interact with your organization's repositories effectively. Please refer below image for permissions required.
After selecting the appropriate organization access permissions, click the Save or Authorize button to save your changes and grant access to our application.
If you encounter any issues during the authorization process or have any questions regarding organization access, please reach out to us at contact us for assistance.
How to create a new Project with external Git provider
Once a Git Credential is created, it can be used during Project creation (video below). Later, this credential will be used to commit and release changes to Git for the entire Project.
If you have not created your Git credentials already, you also have an option to create a Git credential from the Project creation screen directly. This Git credential can be reused for new Projects.
How to commit changes
When you create your first Project, dev
branch is automatically created for you. This is to ensure that no edits/commits are made directly on the main
branch.
Within a Project, create a Pipeline and commit changes to the dev/$USERNAME
branch:
How to create/checkout branch
Currently we are on dev
branch which has our first_Pipeline
.
Now let's see how to go back to our main
branch and also create a new second_branch
from the main branch.
How to merge changes
Let's merge our first_Pipeline
from dev
branch into main
branch.
How to Pull changes
Pulling changes from a branch is as simple as in any GUI based Git interface.
Let's pull our main
branch into the empty second_branch
which we created earlier. Please refer the below video for step-by-step example:
Currently pull only from main
branch to any specific branch is supported.
How to release a branch
Once the changes are merged, we can release
a branch straight from the UI itself.
Databricks scheduler changes would only come into effect once the Project is released.
How to resolve conflicts during merging
Now let's create a Project in third_branch
with same name as first_Pipeline
and put a different path in Dataset.
Post this once we pull the changes from main
into this branch, it would have conflicts as first_Pipeline
exists both in
main
and current
branch.
One way is to use the Git interface directly to resolve conflicts between branches.
Or we can use the simple merge UI on Prophecy to resolve the conflicts
Let's see in the video below on how to resolve conflicts using simple merge on Prophecy:
How to use fork per user Git storage model
During the creation of Project there is an option to choose fork per usage as Git Storage model. When you fork a repository, you create a copy of the original repository (upstream repository) but the repository remains on your GitHub account.
When using the fork per usage Git storage model while creating a new Project, apart from the upstream repository
details, some additional information is needed for the forked repository
.
Let's create a fork of our original repository and pull main
branch from original repository to our newly created forked repository.
Now to pull main branch from upstream repository or from origin of current repository is as simple as clicking on below
Pull Upstream
or Pull Origin
options
- Any changes made in forked repository would not effect the
upstream repository
and would only reflect in theforked repository
. - Please follow the normal Gßit flow for raising pull requests to the
original repository
(upstream repository) from theforked repository
.