I replaced my desktop recently and installed new software through Chocolatey.. One of the things I installed was git. I ran “choco install git” and then started using it. I cloned some repos and everything seemed fine.
Then I cloned a repo of a SQL Source Control database, created a new database and tried to link the repo. I got an error on screen, which I forgot to screen capture. The error was 128, which wasn’t helpful.
Fortunately, I did manage to copy the error to the clipboard. I pasted it in Notepad and saw this:
Aha!
I never configured git. Since I’m mostly working in my own repos, committing back to places that I will access from another machine, I haven’t thought about this. I know I’ve done this on the previous machine because SQL Source Control worked a month ago.
What’s nice about git, and what I wish more software did, is that it tries to help you. In this case, it tells me that it can’t detect an email address and therefore can’t populate the commit metadata.
What do I do?
Run the commands and config my environment. I copied and edited the commands in a command prompt. And typo’d things one time.
Once this was done, SQL Source Control worked.
SQL Source Control is a fantastic way to easily grab your database code and put it into a repo. Give it a try today if you never have tried it, but you’ve ever scripted out your object code.