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?

closed as off-topic by LowlyDBA, Erik Darling, hot2use, SqlWorldWide, Marco Oct 23 '17 at 9:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Shopping list question - questions about which tool, library, product or resource you should use are off-topic here because they quickly become obsolete and often are just about the preferences of the answerer. If you have an issue with or a question about a specific tool, please revise your question to conform to that scope." – Erik Darling, hot2use, SqlWorldWide, Marco
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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

  • 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.