Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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? "

like image 553
Jaffer Sathick Avatar asked Jul 27 '12 18:07

Jaffer Sathick


People also ask

Can we create repository from git bash?

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.

How do I create a folder in GitHub using git bash?

Open Git Bash. Navigate to the directory in which you want to create a folder. Type the following command mkdir <folder name> and Press enter to create the directory.

How do I use git bash?

Step 1: Go to Github repository and in code section copy the URL. Step 2: In the Command prompt, add the URL for your repository where your local repository will be pushed. Step 3: Push the changes in your local repository to GitHub. Here the files have been pushed to the master branch of your repository.


1 Answers

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.

like image 157
Konarak Avatar answered Oct 15 '22 15:10

Konarak