How to Upload Sql Codes Into Github

Yesterday there was a tweet from Allen White.

Allen wanted to add his scripts binder to source command but didn't accept a how to do it handy. So I idea I would write one. Hopefully this will enable someone new to GitHub and to source control get a folder of scripts under source command

GitHub account

If you do not have a GitHub account go to https://github.com and create a new account

There is a funky are y'all a human claiming

Then you can choose your subscription

Then respond some questions (Note – you probably want to cull different answers to the what are you interested in question! I'd advise something technical)

You need to exercise the electronic mail verification

Next is a very important step – Please practice not skip this. You should fix 2 factor hallmark. Yes even if "It's just for me there is naught special here"

Click your user icon height right and then settings

Then click set up 2 gene authentication

and either set up with an app or via SMS (I suggest the app is better)

OK – Now you accept your GitHub account set up. It should accept taken you less fourth dimension than reading this far.

Add a Scripts Folder to GitHub

OK, Now to add together a binder of scripts to a repository. Here is my binder of scripts. They can exist any type of files. I would recommend re-create the binder to a specific Git folder.

Open VS Code – If you lot don't accept VS Lawmaking, download information technology from
https://lawmaking.visualstudio.com/ From the welcome window choose open folder


and open your scripts folder

In VS Code click the Source Control button


and upwardly at the peak you volition see a niggling icon – initialise repository


Click that and cull your binder

Which will and so show all of the changes to the repository (adding all the new files)

Now we need to add a commit message for our changes. I mostly endeavor to write commit messages that are the reason why the change has been made equally the what has been changed is made easy to encounter in VS Code (also as other source control GUI tools)

Click the tick or press CTRL + ENTER and this box will popular up


I never click Always, I click aye, so that I tin can cheque if I am committing the right files. Now we have created a local repository for our scripts folder. Our next step is to publish it to GitHub

Create a New Repository in GitHub

In Github we need to create a remote repository. Click on the New Button. Give your repository a proper name and decide if you lot want it to exist Public (available for anyone to search and find) or Private (only available to people you lot explicitly provide access to).

This will give y'all a folio that looks like this

Copy the code after …or push an existing repository from the control line

          # make sure prompt is at right place Set-Location C:\Git\MyScriptsFolder # So paste the lawmaking git remote add origin https://github.com/SQLDBAWithABeard-Test/TheBeardsFunkyScriptFolder.git git push -u origin master        

and paste it into PowerShell in VS Code. Make sure that your prompt is at the root of your scripts folder.

Make full in your username and password and your 2FA

Then you will see a page like this

and if yous refresh your GitHub page you volition come across

Congratulations, your code is source controlled 🙂

Making Changes

Now you tin can make a change to a file

Commit your change

Hit the roundy-roundy icon (anyone know its proper proper name ?)

Press OK and your commit volition be pushed to Github 🙂

Yay – Source Control all the things

leathermanbecove.blogspot.com

Source: https://sqldbawithabeard.com/2019/04/05/10501/

Belum ada Komentar untuk "How to Upload Sql Codes Into Github"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel