I am running the following script to set up a git repository on GitHub:
Global setup:
git config --global user.name "Your Name"
git config --global user.email email_id@email.com
Next steps:
mkdir MultiView
cd MultiView
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin https://github.com/nalgene/MultiView.git
git push -u origin master
The last line git push -u origin master
or git push origin master
for that matter returns an error:
fatal: https://github.com/naglene/MultiView.git/info/refs not found: did you run git update-server-info on the server?
I researched the issue and it seems the most likely reason is a typo (case sensitive) but I made sure that is not an issue. I used git remote -v
to check the origin is correct. What else can be the issue?
You have to carefully look after your spelling. According to Github's guide, your username is nalgene
, hence the URL is https://github.com/nalgene/MultiView.git
. The error message hints that you added the remote as https://github.com/naglene/MultiView.git
which is not the same username, as you swapped the l
and g
.
Also, the default branch is called master
, not maaster
or mater
.