Integrate Your Application With a Git Repository

You can specify a Git repository for each of your applications to collaborate with other team members and backup your sources.

About Git Integration

You can integrate your visual applications with a Git repository hosted with an Oracle Developer Cloud Service project.

You can use the Git integration to store versions of the source files of each of your visual applications in a Git repository that can be shared with other developers. After creating a link to a Git repository, you can use the commands in the Git menu to pull sources from the repository and push sources to the repository. A log of merge conflicts when pulling sources is displayed in the Audits window, and you can open the files in the source editor to view and resolve the conflicts.

Add Credentials for Your Developer Cloud Service Account

To integrate your visual application with a Git repository, you must provide the URL and credentials for a Oracle Developer Cloud Service account. Those credentials are used when linking your visual application to a Git repository of a Oracle Developer Cloud Service project.

You will need to contact your service administrator if you do not know the credentials for your Oracle Developer Cloud Service account. Credentials are not stored when you export your application.

To add your Oracle Developer Cloud Service account credentials:

  1. Open your visual application.
  2. Click the Git icon ( Git icon ) in the toolbar and select Configure DevCS Credentials in the menu.
  3. Click Add Credentials in the Configure DevCS Credentials dialog box.
  4. Enter the URL, username and password for your Oracle Developer Cloud Service account. Click Save Credentials.

    Description of git-add-credentials.png follows
    Description of the illustration git-add-credentials.png

    After your credentials are checked and saved, the new credentials are added to the list in the Configure DevCS Credentials dialog box.

  5. Click Close in the Configure DevCS Credentials dialog box.
After you enter and save your credentials for Oracle Developer Cloud Service account you can create a link between a visual application and a specific repository.

Link Your Visual Application to a Git Repository

After you provide your credentials to your Oracle Developer Cloud Service account, you can create a link between your visual application and a Git repository of your Oracle Developer Cloud Service project.

After you link your application to the branch of a Git repository, you can pull source files from and push source files to the branch, for example, to create a copy of an application by pulling the source files into a new visual application.

The Git repository and branch must exist in your Oracle Developer Cloud Service project before you can link it to your visual application. When selecting the repository branch that you want to use, you will see an up-to-date list of the branches that are available. If you do not see the branch you want to use, you should check that the branch exists and that you are using the correct credentials. You cannot use Oracle Visual Builder to create repositories or branches.

To link a visual application to a branch in a Git repository:

  1. Open your visual application.
  2. Click the Git icon and select Link DevCS Git Repository in the Git menu.

    The dialog box will display the location of a Git repository if one is already linked to your visual application.


    Description of git-linked-git-status.png follows
    Description of the illustration git-linked-git-status.png
  3. Click Add Link to open the Link DevCS Git Repository dialog box.
  4. In the DevCS URL with Credentials field, select the URL of the account that you want to use.

    The dropdown list displays the Oracle Developer Cloud Service accounts that you provided credentials for.

  5. Select the project, the Git repository and the repository branch. Click Save Configuration.
    The dropdown list displays the projects, repositories and branches that are available to you in the instance. The branches and repositories in the dropdown list are determined by the project that you select.
  6. Click Close in the Linked DevCS Git Status dialog box.
You can now use the push and pull commands in the Git menu of your visual application.

Pull Files From Your Git Repository

You use the Pull from Git command in the Git menu to update your visual application with the source files from the linked Git repository.

To pull source files from a repository:
  1. Open your visual application
  2. Click the Git icon in the toolbar and select Pull from Git in the menu.

    The Update Application from Git dialog box displays the details of the branch containing the source files.


    Description of git-update-application.png follows
    Description of the illustration git-update-application.png
  3. Click Update From Git.

    The dialog box displays a progress bar while pulling the source files from the branch. You

  4. Click Close when the update is finished.

    The dialog box displays a status message when the update is complete.


    Description of git-update-application-complete.png follows
    Description of the illustration git-update-application-complete.png

Push Your Changes to Your Git Repository

You use the Push to Git command in the Git menu to upload the source files in your visual application to the linked Git repository.

To help avoid merge conflicts, you should update the source files in your visual application by pulling the most recent versions from the repository before you push any changes. If the file versions in the repository are newer than the versions in your visual application, you’ll see a status message when attempting to push your changes that the push was rejected and you should pull the most recent versions from the repository before pushing.

To push the visual application source files to the repository:

  1. Open your visual application
  2. Click the Git icon in the toolbar and select Push to Git in the menu.

    The Push Content to Git Repo dialog box displays the details of the target branch.


    Description of git-push-content.png follows
    Description of the illustration git-push-content.png
  3. Type a comment that describes the content you are pushing to the repository. Click Push to Git.

    The comment message that you provide in the dialog box is displayed when you examine the Git activity log for the branch in Oracle Developer Cloud Service.

  4. Click Close when the push is finished.

    The dialog box displays a status message when the push is complete.


    Description of git-push-content-complete.png follows
    Description of the illustration git-push-content-complete.png