Episode #9 | GitHub Remote Repository

Wednesday, 24 Oct 2018 Kudzai Nyandoro 11:31 Minutes


In this episode, we're going to create our first local version control repository for our SQL projects and then connect it to a remote repository on GitHub.


Check the configured name of a user

$ git config user.name

Check the configured email address

$ git config user.email

Create a directory

$ mkdir sql

Enter into the directory

$ cd sql

Create a README file and add text to it

echo "Name: Kudzai Nyandoro
> Project: SQL with PostgreSQL
> Email: kudzai@kode47.com" > README.md

Initialize the git repository

$ git init 

Add all changes to git

$ git add -A

Commit all changes to git

$ git commit -m "Initial commit"

Visit https://github.com

Create a new remote repository (See episode #9 for more)

Copy the needed text which you'll use below (See episode #9 for more)

Connect your local repository to your remote repository. This is what mine looks like.

$ git remote add origin https://github.com/kode47/sql.git

Push the master branch of your project to GitHub

$ git push -u origin master