Committing changes
Published 16 J 2015
Committing a change updates source control with that change.
When you make changes to source-controlled databases, SQL Source Control labels affected objects in the Object Explorer:
To update source control with your changes, go to the Commit changes tab:
The Commit changes tab lists all the objects in your database that anyone has made changes to.
To commit changes:
- Select the objects you want to commit.
Write a comment describing your changes (optional).
To reuse previous commit comments, on the right of the comment field, click
- Click Commit.
A progress dialog box is displayed while SQL Source Control commits the changes to your source control system.
Click OK to close the dialog box.
Source control is updated with your changes.
You can also commit changes by right-clicking an object, folder, or database in the Object Explorer, and clicking Commit changes to source control. The Commit changes tab is displayed, with the objects you clicked selected to commit.
If you're using Git
If you're using Git, to get changes into your remote repository, you need to push after you've committed them.
To do this, find the blue banner above the commit grid and click Push. This pushes all commits from the local repository to the remote repository.
Integrating with bug tracking systems
You can use SQL Source Control to associate your commits with an SVN bug IDs or TFS work items. You might do this to better integrate database changes with a bug-tracking system, or the project management functionality of Team Foundation Server.
SQL Source Control only supports this by adding the bug ID or work item number to the comment you make when committing changes.
SVN bug IDs
SVN bug IDs are enabled using bugtraq properties. You can use these to add commit hooks to make SVN parse log messages for bug or issue numbers and relate them to your issue tracking system.
To associate a commit with a bug or issue, include the issue number in the commit comment with a # symbol. For example: This commit addresses issue #100
TFS work items
TFS work items are used to track pieces of work in a development project. Each work item has a number.
- To associate a commit with a work item, include #A[Work Item number] at the start of the comment. For example: #A106 adding tables
- To resolve a work item, include #R[Work Item number]at the start of the comment. For example: #R106 adding tables
Note that, for resolving work items, only the "Agile" TFS Project template is supported.
The numbers don't appear in the commit comment recorded on the TFS Server.