How to create a new repo at Github using git bash?

Jaffer Sathick picture Jaffer Sathick · Jul 27, 2012 · Viewed 56.3k times · Source

How can I create a new repository from my machine using git bash?

I followed the below steps:

mkdir ~/Hello-World

cd ~/Hello-World

git init

touch README

git add README

git commit -m 'first commit'

git remote add origin https://github.com/username/Hello-World.git

git push origin master

But I'm getting "Fatal error: did you run update-server-info on the server? "

Answer

Konarak picture Konarak · Jul 27, 2012

You cannot create a repo on github using git bash. Git and github are different things. Github is a platform that let's you host and collaborate on code while git is the version control tool used. You can read more about them on wikipedia articles: github and git.

However if your intention is to create a github repo using terminal, you can do it using the github api and curl.