SQL Source Control 7

Link to Git

Git in TFS/Azure DevOps

If you're using TFS / Azure DevOps Server / Azure DevOps Services with Git-based version control, you should use Git mode to link.

This page explains how to link your database to an existing Git repository.

  1. In the Object Explorer, select the database you want to link to source control.
  2. In SQL Source Control, on the Setup tab, make sure Link to my source control system is selected and click Next:
  3. On the Link to source control dialog, select Git
    The Link to Git page opens:
  4. In the Folder field, specify a folder in an existing local Git repository where SQL Source Control will save SQL scripts. For example: C:\Repository\DatabaseFolder
    If you're the first person to link the database to source control, specify an empty folder. 
    If someone has already linked this database to source control, specify the folder they used.

  5. Click Link
    The database is linked to source control. The database icon in the Object Explorer turns green to show that the database is linked:

If you're the first person to link this database

Add the database objects to source control:

  1. Go to the Commit tab and commit the objects. 
  2. Find the blue banner above the commit grid and click Push.
    This pushes all commits from the local repository to the remote repository. 

If you linked a database that's already in source control

Update your database to the latest version:

  1. Go to the Get latest tab and click Pull from remote repository.
  2. Click Apply changes to database.
    The schema from the local repository is deployed to the database.

Didn't find what you were looking for?