Source Control without the need to commit (outside of GIT)

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! :)

Best Answer

  • AlexYatesAlexYates Cambridge, UKPosts: 263 Rose Gold 2
    edited February 10, 2020 2:26PM Answer ✓
    It'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 and Data Relay
    Creator of Speaking Mentors
    Microsoft Data Platform MVP
    Friend of Redgate
    Twitter / LinkedIn

Answers

Sign In or Register to comment.