Source Control without the need to commit (outside of GIT)
Louis_RH
Posts: 3 New member
Hi all,
Firstly I should apologise as I am sure that this question will have been answered somewhere but I have looked and cannot find it!
I am currently trialing SQL Source Control - we really like it but already use a different GIT Client (Git Kraken) to manage our GIT workflow. What I am hoping to achieve is getting SQL Source Control to generate a list of objects to store in GIT automatically on the fly without the need to commit through the SQL Source Control interface. The folder that contains these definitions would then be in a GIT tracked folder (as well as out .NET development code) such meaning that whenever we made a code change that had both a .NET and SQL component these would be checked in simultaniously without the need to do one commit in SSMS and then a further one in Git Kraken.
The long term goal (and the reason why I am keen to make it one commit) is so we can start using Teamcity to autodeploy both .NET and SQL changes in one go. Currently it would be quite easy to end up checking in .NET changes while forgetting to first commit in SSMS and so database changes would fail (and break the release).
I was hoping I could do this from the "Link to a working folder" option but it seems that this still requires that you manually "commit" changes in order for the objects to be updated in GIT.....
Any advice on this would be very much appreciated!
Tagged:
Best Answer
-
AlexYates Posts: 264 Rose Gold 2It's not available out of the box - but it could probably be automated using some sort of DDL triger and the SQL Compare command line.
That said, any automated solution like that fills me with dread. It feels particularly painful to support/maintain. Much easier to get into the habbit of saving changes in SQL Source Control (using the "working folder" option) and then using the prefered git tool to manage commits/pushes etc.Alex Yates
DevOps Mentor and Coach
Director of DLM Consultants
Creator of Speaking Mentors
Microsoft Data Platform MVP
Friend of Redgate
Twitter / LinkedIn
Answers
The button is renamed from "commit" to "save changes" if you use this option.
DevOps Mentor and Coach
Director of DLM Consultants
Creator of Speaking Mentors
Microsoft Data Platform MVP
Friend of Redgate
Twitter / LinkedIn