Git for SSDT Projects: Where It All Comes Together

This is the post where everything clicks.

Over the last eight posts, we’ve mapped git concepts to database analogies: repositories as databases, branches as database copies, merging as synchronization, tags as snapshots. You’ve got the vocabulary. Now let’s apply it to the workflow you actually care about — managing SQL Server database projects with version control.

SSDT (SQL Server Data Tools) projects — whether the classic .sqlproj or the newer SDK-style format — are the ideal git use case for DBAs. Every database object becomes a file. Every change becomes a commit. And git does what it does best: tracks every version of every file, forever.

A woman DBA at a three-monitor command center connecting database schema, git commit history, and pull request reviews into a unified pipeline.

Why SSDT + Git Is a Natural Fit

An SSDT project decomposes your database into individual files:

That’s your database catalog, materialized as a file system. Every table, view, stored procedure, and schema gets its own file. This maps directly to what we discussed in Your Repository Is Just a Database — the repository is a database, and now you’re literally storing a database in it.

Your .gitignore: What NOT to Track

Before your first commit, set up a .gitignore file. SSDT projects generate build artifacts that shouldn’t be version-controlled — they’re like tempdb files. You wouldn’t back up tempdb, and you shouldn’t commit these:

The Daily Workflow

Here’s what a typical day looks like with SSDT + git. Every step uses concepts from earlier in this series.

Morning: sync up

Start a feature: branch

Make changes: commit

Open the SSDT project, create a new table, modify a stored procedure. Each change goes into a commit:

Before merging: clean up

Tag the milestone

Share your work: push and create a PR

Then create a pull request. We’ll talk about why PRs matter in a moment.

Merge Conflicts in Stored Procedures

Here’s where it gets real. Two DBAs modify the same stored procedure on different branches. When you merge (Merging Is Like Synchronizing Two Databases), git can’t auto-resolve the conflict:

You changed the date filter to 30 days. Your colleague changed it to 90 days and added a shipping filter. Git doesn’t know which business rule is correct — that’s your call.

Fix it by combining both intents:

Then:

Pull Requests: The New Deployment Approval

This is the concept that transforms how database teams work.

A pull request (PR) is a formal request to merge your branch into another branch — typically dev or main. But it’s more than a merge request. It’s a review gate.

Before your schema change hits the shared branch:

  • Another DBA reviews the SQL
  • They can comment on specific lines — “This index is missing INCLUDE columns”
  • Automated checks can run (build the SSDT project, check for warnings)
  • You need explicit approval before the merge happens

This is your deployment approval process, codified. No more “I sent a Slack message and nobody objected, so I deployed it.” The PR is the audit trail.

For how CI/CD pipelines can automatically build and test your SSDT project on every PR, see AI for DBAs Post 14: Version Control & CI/CD. For using AI to review database code in PRs, see AI-Assisted Pull Request Reviews for Database Code.

Branching Strategy for Database Projects

Keep it simple:

main — always represents the current production schema. Never commit directly to main.

dev — integration branch. Feature branches merge here first.

feature/xxx — one branch per schema change. Create from dev, merge back to dev via PR.

hotfix/xxx — emergency fixes. Create from main, cherry-pick (Cherry-Pick Is Cross-Database INSERT…SELECT) to dev after deploying.

Try This Yourself

If you have an existing database you want to get under version control, sqlpackage can extract it. (For common pitfalls, see SqlPackage, Synonyms, and the Third-Party Database Problem.)

You just put a database under version control. Every concept from this series — branching, merging, rebasing, tagging, cherry-picking — now applies to your schema.

The One Sentence to Remember

SSDT + git turns your database schema into version-controlled, reviewable, branchable code — every concept from this series working together in one workflow.

Previously: Cherry-Pick Is Cross-Database INSERT…SELECT
This is the final post in the Git for DBAs series. Start from the beginning with Your Repository Is Just a Database.

Got questions? Find me on Bluesky or LinkedIn.