I can not clone my local git repo into GitHub

I am new to git and GitHub. I have created some git repos on my local computer. Now I want to get what I think is called mirrors of these repos onto GitHub so I can keep them synced with the repos on my local machine. I thought cloning was the way to do this. It looks like it is working during the bash session but when I go to my GitHub Account I can see no sign of the new-project repo. I can see the repo I made from within GitHub. I have pasted the bash session below. Any help would be very much appreciated.

steve@laptop ~ $ ls dir1
steve@laptop ~ $ ls dir2
steve@laptop ~ $ git clone dir1/project dir2/new-project
Cloning into ‘dir2/new-project’…
steve@laptop ~ $ ls dir2
steve@laptop ~ $ git clone dir1/project https://github.com/stevespages/new-project
Cloning into ‘https://github.com/stevespages/new-project’…
steve@laptop ~ $

You have to make the remote repository otherwise doesn’t exists this repo https://github.com/stevespages/new-project. you can not clone something to somewhere that doesn’t exists, so you have to create the remote repository in github:

and then connect the two repository (your local and your origin) with the command:

git remote add origin https://github.com/stevespages/new-project.git

when you will make some change you can add-commit-push and see the result!

PS: if you are in your first use of git probably this is necessary


Thanks for your reply. I have now managed to do it with your help. I had already done the hello-world activity which you suggested. It was definitely useful too.