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? "
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With