dbForge Source Control is a Microsoft SQL Server Management Studio (SSMS) add-in that is designed to manage database changes in the best-known version control systems. With the help of the tool, you can version-control database schemas and data, roll back unwanted changes, handle static data conflicts, and maintain the integrity of the database. Via Source Control, you can link your database to Git, a distributed version control system. Git is aimed at coordinating the work of multiple developers and provides non-linear workflow.
When dbForge Source Control connects to a Git repository, is the connection secure? In other words, is TLS enabled?
dbForge Source Control connects to Git using the standard Git client for Windows, which supports current security protocols, including TLS 1.2. Secure connections are established when the server both supports them and requires them. For instance, if a repository’s address begins with HTTPS and the server stipulates TLS, the connection will comply with these security requirements. The choice of security protocol is determined by the server’s configuration, not by dbForge settings.
Note
dbForge Source Control v2.2 and later support Git for Windows client version 2.28.0 and higher. You can check the Git version with the
git --version
command. Thanks to it you can work with all possible connection and authentication types, as this task is delegated to the Git client. Before trying to connect your database to Git, make sure that you have Git for Windows client installed on your machine.
To get started, ensure that Git for Windows client is installed on the machine.
To link a database to a remote repository, you must have a cloned copy of the remote repository, which may be hosted on platforms such as GitHub or GitLab, or created locally using the git init --bare
Git command.
See the following how-to topics to learn how to clone a remote repository and link a database to a Git repository in:
dbForge Source Control does not allow working with a local repository. The repository needs to have both an adjusted remote branch and a local branch tracking the remote one.
To work with a local Git repository, perform the following steps:
1. Create an empty folder on the disk of your computer where the local repository will be stored.
2. Start Windows Command Prompt (CMD).
Note
To change the disk drive and navigate to the empty folder you created, in the Command Prompt, use the
cd
command.
3. Type git init --bare
to create the main repository locally.
4. Navigate to a different folder and clone the local repository using git clone <pathToMainRepo>
. Make sure to place a dot at the end of the command to clone the repository to the folder you have created. Otherwise, another subfolder will be created.
Note
<pathToMainRepo>
is the path to the main repository you created locally when executing thegit init --bare
command.
5. Execute these CMD commands in the folder in question:
git commit --allow-empty -m initial
to make an initial commitgit push
to push the changes to the remote repository6. Link dbForge Source Control to that folder in the following order:
In Object Explorer, right-click the database you want to link to source control and select Source Control > Link Database to Source Control.
In the Link Database to Source Control dialog that opens, click + in the Source control repository field to open the Source Control Repository Properties dialog.
In the dialog that opens, do the following:
Click Test to verify that the database has successfully been connected to source control.
Click OK to close the Source Control Repository Properties dialog.
In the Link Database to Source Control dialog, select a database development model and click Link.
In this video, we will explain how to collaborate on the same database project using dbForge Source Control for SQL Server. The video provides the case where two developers try to push database changes to a Git remote repository simultaneously.
To learn more about versioning SQL databases linked to Git, you can refer to the following pages: