Error linking database to Git

alannaalanna Posts: 10
I'm in the process of evaluating a bunch of the Red Gate tools - SQL Source Control being one of them. Currently, none of our databases are in source control and this getting to be a big issue for us. We use Git repositories on Visual Studio Online for our code-base and would like our Databases to sit there as well.

I created an empty Git repository on VS Online, cloned a local (empty) version of it on my local machine. I also have a local copy of the database already created in SSMS. I have clicked the link to Link this local database to source control, I provide it with a path to my local repository, select the Git config file, Dedicated Database, and when I click Link, I get an error (see below). Before I click Cancel on the error dialog, I can see that a bunch of files and folders have been created in the folder that I'd specified as being my local repository. When I click Cancel on this dialog they disappear (as they should, seeing as it's reverting!). Here's the error reported in the dialog box:
Command:
git add "RedGate.ssc" "CommandLineHooks.xml"

Output:

Exit code:
1

I have searched online for some assistance but have been unsuccessful.

If I open the Windows NT SQL Server Log, I can see a bunch of warnings and errors that SQL Source Control 3 has logged but I'm not entirely sure what they mean. It may also help to mention that I'm relatively new to Git (I did manage to migrate all our SVN repositories into Git a few weeks ago and things have been running smoothly since then, which is why they tasked me to get our databases into Git as well). The first of these warnings/errors is below, I'm not sure, but I have a feeling if I could resolve that, then the rest might just fall into place. I can't see a way to attach files on here, otherwise I'd attach all of them.
SocAppData<nl/>Invalid working path (not rooted ) set in engine options. Using defaults

I'm sure I'm missing something small, likely with how my Git repository is set up (that's my guess at least). If anyone could point me in the right direction, that would be great. Thanks!

Comments

  • Just in case anyone else has the same issue in the future, the issue was that the git config file requires that the path to git.exe is contained within the Windows path variable. It wasn't for me, so I had to create a custom git.xml config file and specifying the full path to git.exe for each of the command lines.

    I knew I was missing something simple :)
  • alanna wrote:
    Just in case anyone else has the same issue in the future, the issue was that the git config file requires that the path to git.exe is contained within the Windows path variable. It wasn't for me, so I had to create a custom git.xml config file and specifying the full path to git.exe for each of the command lines.

    I knew I was missing something simple :)


    Please, get your string xml for add operation git. I have some problem.
Sign In or Register to comment.