This topic explains how to link a database to Git.
- In Database Explorer, right-click a database you want to link to source control.
Point to Source Control Tasks, and then click Link database to source control… on the shortcut menu.
The Link Database To Source Control wizard opens.
On the Link tab of the wizard, click ‘+’ in the Source control repository field.
The Source Control Repository Properties dialog box opens.
Select Git from the Source Control system drop-down list box.
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.
- 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.
- Click OK to close the Source Control Repository Properties dialog box.
- Select a database development model. For more information, refer to the Database Development Models topic.
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.