5

I am trying to figure out a way to have all of our random SQL scripts that we write under source control. I am already using SSDT for the database project. This is not for these sort of scripts. It is for all the other random queries that we run over time. Before we put them in a stored procedure. Or the other scripts that just don't really fit as a SP.

How can I bring my non SSDT Sql scripts under source control using Visual Studio?

  • For those closing b/c of shopping list - I am open to editing my question. I would just need guidance on what to add/remove. – Anthony Genovese Oct 19 '17 at 14:07
5

Sure you can, that's what I do with my projects. Have a look:

Create a new Project, I use SQL Server Database Project because I generally end up adding more than just scripts.

enter image description here

Add items. Scripts in this case.

enter image description here

Go the Team Explorer and select GitHub (or TFS if that's what you're going to work with)

enter image description here

I'm going to create a new Private Repository.

enter image description here

Done!

enter image description here

Now Push the changes...

enter image description here

Finish!

enter image description here

| improve this answer | |
  • 1
    I don't know how I missed that script part. I'm going to test this morning and mark it as accepted if it works. Thank you so much! – Anthony Genovese Oct 19 '17 at 14:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.