Connect RedGate SQL Source Control to GIT
noob2016
Posts: 22 Bronze 3
So I have the following environments:
Desktop with SSMS and SQL Source Control installed
ServerA where GIT repository is created
ServerB where working directory will be.
I am hoping to create a connection from desktop --> serverB (scripts of database objects) --> serverA (added to GIT repository). I have not been able to set it up and not sure what I'm doing wrong.
Option 1:
These are the steps I took:
1. From my desktop, I have created a mapped Z drive to ServerB location (where the working directory will be).
2. Ran the GIT Gui on that folder and initialize (.git hidden folder created)
3. From desktop, click on database I want to add to SQL Source Control.
4. On the SQL Source Control tab, I click Setup menu.
5. I then choose Link to working folder and click Next
6. On the new window (Link to source control), working folder is chosen on the left panel. On the right panel, I tried to browse... to the Z drive folder that was created on Step 1; but, I can only choose local drive (C: and [which is a DVD drive]).
Question 1: Can I link to map drive? If so, how do I do it?
Option 2:
1. From my desktop, I have created a folder in my local directory (c:)
2. Ran the GIT Gui on that folder and initialize (.git hidden folder created)
3. From desktop, click on database I want to add to SQL Source Control.
4. On the SQL Source Control tab, I click Setup menu.
5. I chose Link to my source control system and click Next
6. I then choose Git in Choose your source control system page and click Next
7. I then browse to folder on local drive C: and click Link
At this point, everything looks to be successful. The database icon changed and the only object I have to test is blue and says "This table has changes to commit" when I hover over it.
8. I right click on the table object and choose Commit changes to source control
9. Here I got an error "sending files to source control server failed (see details above). Click to report this error" If I click on the error message, I get Error details as Command line hook failed.
I'm not really sure how to work this. Help?
Desktop with SSMS and SQL Source Control installed
ServerA where GIT repository is created
ServerB where working directory will be.
I am hoping to create a connection from desktop --> serverB (scripts of database objects) --> serverA (added to GIT repository). I have not been able to set it up and not sure what I'm doing wrong.
Option 1:
These are the steps I took:
1. From my desktop, I have created a mapped Z drive to ServerB location (where the working directory will be).
2. Ran the GIT Gui on that folder and initialize (.git hidden folder created)
3. From desktop, click on database I want to add to SQL Source Control.
4. On the SQL Source Control tab, I click Setup menu.
5. I then choose Link to working folder and click Next
6. On the new window (Link to source control), working folder is chosen on the left panel. On the right panel, I tried to browse... to the Z drive folder that was created on Step 1; but, I can only choose local drive (C: and [which is a DVD drive]).
Question 1: Can I link to map drive? If so, how do I do it?
Option 2:
1. From my desktop, I have created a folder in my local directory (c:)
2. Ran the GIT Gui on that folder and initialize (.git hidden folder created)
3. From desktop, click on database I want to add to SQL Source Control.
4. On the SQL Source Control tab, I click Setup menu.
5. I chose Link to my source control system and click Next
6. I then choose Git in Choose your source control system page and click Next
7. I then browse to folder on local drive C: and click Link
At this point, everything looks to be successful. The database icon changed and the only object I have to test is blue and says "This table has changes to commit" when I hover over it.
8. I right click on the table object and choose Commit changes to source control
9. Here I got an error "sending files to source control server failed (see details above). Click to report this error" If I click on the error message, I get Error details as Command line hook failed.
I'm not really sure how to work this. Help?
Comments
I have logged a support ticket and will get in touch with you through that channel to troubleshoot this issue.
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Regarding Option 2, this message is usually a result of the commit not having an associated comment
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
To be more clear:
I am trying to connect SQL Source Control to Git. When I go to select a folder after choosing "Link to my source control system" the window just closes. If I navigate to the parent folder (still on the mapped network drive) Source Control tells me "this folder is not a Git folder". So that's confirmation that Source Control can in-fact see the mapped drive. But when I go to the actual Repo Folder, it instantly closes and I don't have an option to move forward.