Linking a Database to Git

This topic explains how to link a database to Git.

  1. In Database Explorer, right-click a database you want to link to source control.
  2. Point to Source Control Tasks, and then click Link database to source control… on the shortcut menu.

    Link DB to Source Control

    The Link Database To Source Control wizard opens.

  3. On the Link tab of the wizard, click ‘+’ in the Source control repository field.

    Link DB Wizard

    The Source Control Repository Properties dialog box opens.

  4. Select Git from the Source Control system drop-down list box.

    Link DB to Git

  5. Set up Source control settings. dbForge Studio allows to use remote repository or local clone of the remote repository.

    To link a database to remote repository, specify:

    • URL of the Remote Repository.
    • If you connect via HTTP or SSH protocol, set up Security settings:
      • For the HTTP protocol, specify:
        • Login and Password for the remote Git repository.
        • Client Certificate, if the server is set up for authentication using the client certificate.
    • For the SSH protocol, specify authentication method:
      • To authenticate with a password, select the Password option, and type your password in the corresponding box.
      • To authenticate with a key, select the Key option, and provide path to the key file and passphrase in the corresponding boxes.
    • Branch.
    • Git User name and E-Mail.
    • Repository name.

    If you have a ready local clone of the remote repository, you can use it instead of the technical clone created by dbForge Studio. In this case, all settings (including address of the remote repository) will be taken from the selected local clone.

    To link a database to local clone:

    • Select the Use existing local clone check-box and specify path to it.
    • Select Branch from the drop-down list box.
    • Specify Git User name and E-Mail.
    • Specify Repository name.
  6. Click OK to close the Source Control Repository Properties dialog box.
  7. Select a database development model. For more information, refer to the Database Development Models topic.
  8. Click Link. If a database is linked to source control successfully, a database icon in Database Explorer will be changed to show that a database is linked.

    Linked DB