Initializing a brand new git repo and pushing it to a remote source

Hello world! I wanted some kind of content to go along with my first post, so I decided to make a quick tutorial on starting a new GitHub repo.

GitHub is the most popular git repository hosting service on the web right now. You can create as many public repos as you want with a free account, but private repos will cost you a few dollars a month. I’m sure most git users are familiar with the most common commands ( git status, git commit , etc.) but some people like me still have to look up the commands for initializing a new remote repository. Here I am consolidating all that info to help myself and others streamline this process.

First, create a new repository on GitHub, but do not check the option to initialize the repo with a README. This is because we want the repo to be empty so we can push our local version to it.

On your local box, if this is your first time using git, you will need to set your username and email using these two commands:

Then cd into your working directory

Initialize the repo

Add the files

Make the first local commit

Finally, add the remote GitHub repo and push it out

You should now be able to view your repo on!