Azure Data Studio, workspaces and Git

Rod At Work 866 Reputation points
2021-12-02T18:52:36.907+00:00

I've used Azure Data Studio (ADS) for a couple of years. I like it, especially with its integration with Git repos like Azure DevOps Services or GitHub. However, this week I've run into a problem. I created a new repo in Azure DevOps, then cloned it locally. When I went to commit it, ADS showed me two Git repos in Source Control. I am very confused and not sure how to proceed. I've been asking around and was told I should be using something called a "workspace" in ADS. I've never used an ADS workspace before, at least not intentionally. So, if this is the way I need to proceed to have ADS only work with one Git repo, how do I go about making this happen? It's my understanding that I can create a workspace, then add the files and folders I've to it, but where do I put it? Here's my current folder structure:

154594-confusing-git-repos-in-ads.png

As you can see from this snapshot of File Explorer, I've created the local Git repo in folder SQLScriptsForReports. Then within that I placed two folders NewPWReports and OldPharmacyReports. (I want to save the new ones I create and the old SQL scripts in their respective folders.) Looking into ADS's workspace I understand it to be a file that keeps track of the files and folders, as well as my personal settings for this project. Sort of like Visual Studio's .sln and .csproj files, plus some additional information. Anyway, do I create the workspace file in the SQLScriptsForReports folder or do I create it in the PWReports folder?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,765 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor
    2021-12-03T02:59:48.953+00:00

    Hi RodAtWork,
    You can go to File-> click Add Folder to Workspace, and select the folder to add to a new workspace.

    154637-image.png

    Please check this tutorial video which might be helpful.

    Best Regards,
    Amelia


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful