GIT repository with RedGate SQL Source Control

  • whoamisoon

    SSC Enthusiast

    Points: 189

    I am trying to setup RedGate SQL Source Control with GIT repository. I came across this article[/url] and have a couple of questions:

    1) under GIT Setup heading:

    it says to input "git init" command. Will I need to install anything on my desktop to use that command?

    2) the article initialize under c:\ local drive. Can it be initialize under UNC path (\\some server\some folder)? If not, will mapped drive work?

    3) IF I have multiple servers with multiple databases, how exactly will I create the local repository? Will the init be executed as follows:

    a) c:\mssql\server1\db1>git init

    b) c:\mssql\server1\db2>git init

    c) c:\mssql\server2\db1>git init

    d) c:\mssql\server3\db3>git init

    ... so on

  • Steve Jones - SSC Editor

    SSC Guru

    Points: 714637

    1. Yes, you need git installed. You can install any version. I've used TFS Git, but installed from the open source git repo[/url].

    2. Any path will work. This just needs to be a place that your system accesses. Note, this should not be a shared folder with other developers. Your commits should be your commits. That's the idea of git. Each developer has their own repo and commits, then pushes to a remote. Everyone pulls from a remote.

    If you are trying to work from multiple machines, just git init a folder from each one. No reason to have a shared folder.

    3. Yes, each repo is for a database. I typically use a subfolder, because I may create some test scripts, inits, data scripts, etc that I want to put in the VCS. So I'd have:

    c:\git\db1 - git init here.

    c:\git\db1\DDL - link SQL Source Control here.

    If you have more questions, ask.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply