Git

To use SQL Source Control with Git, version 2.3 or later of Git for Windows must be installed. You must also prepare Git for first use from outside SQL Source Control - see this page for help configuring your username, email and credentials.

SQL Source Control requires that Git is present on your PATH - this will be the case for a default installation. If Git is not on your PATH, you can add it using the steps described below.

Adding Git to your path

  1. In Control Panel go to System and select Advanced system settings.
  2. Click Environment Variables.
  3. Under System variables, select Path and click Edit.
  4. Add the path to your Git installation (e.g. C:\Program Files\Git\cmd).
  5. Restart SSMS to ensure the new PATH is picked up.

You can test whether Git is on your PATH by attempting to call any Git command from a terminal window (e.g. git --version).

If a database linked to SQL Source Control continues to show an error of the form "Git must be installed on this machine" after the path has been successfully updated it may be necessary to perform the following steps:

  1. Unlink the database from Source Control
  2. Restart SSMS
  3. Relink the database to Source Control

Using SSH

It is possible to use a Git repository with SSH. However, it is not possible to enter a passphrase for a SSH key, so using passphrases are not supported.


Didn't find what you were looking for?