In my last post I showed how to add a folder of scripts to GitHub using Visual Studio Code.
You can do it with Azure Data Studio as well. It’s exactly the same steps!
The blog post could end here but read on for some screen shots 😉
Follow the previous post for details of setting up a new GitHub account
Create a repository in Github
Open the folder in Azure Data Studio with CTRL K CTRL O (Or File –> Open Folder)
Click on the Source Control icon or CTRL + SHIFT + G and then Initialize Repository
Choose the folder
Write a commit message
Say yes to the prompt. Press CTRL + ‘ to open the terminal
Navigate to the scripts folder. (I have a PSDrive set up to my Git folder)
and copy the code from the GitHub page after “…or push an existing repository from the command line”
and run it
and there are your scripts in GitHub
Make some changes to a script and it will go muddy brown
and then write a commit message. If you click on the file name in the scource control tab then you can see the changes that have been made, that are not currently tracked
Commit the change with CTRL + ENTER and then click the roundy-roundy icon (seriously anyone know its name ?) click yes on the prompt and your changes are in GitHub as well 🙂
Realistically, you can use the previous post to do this with Azure Data Studio as it is built on top of Visual Studio Code but I thought it was worth showing the steps in Azure Data Studio.
Happy Source Controlling