GitHub - getting started creating a repo
I followed these instructions from GitHub web page to create a first repo;
Global setup: Set up git git config --global user.name "Your Name" git config --global user.email email@example.com Next steps: mkdir OpenSourceContrib cd OpenSourceContrib git init touch README git add README git commit -m 'first commit' git remote add origin firstname.lastname@example.org:dlib/OpenSourceContrib.git git push -u origin master
Existing Git Repo? cd existing_git_repo git remote add origin email@example.com:dlib/OpenSourceContrib.git git push -u origin master
Everything goes ok until cd existing_git_repo ; then, I tried several path in the following command 'git remote add origin ...' (notably, I first tried with the path where README file is located, beginning c:/Users/...). Now, when I write this precise bash command
git remote add origin firstname.lastname@example.org:dlib/OpenSourceContrib.git
fatal: remote origin already exists
and when I write the next command,
git push -u origin master
I have the following error
ERROR: repository not found fatal: The remote ended up unexpectedly
I don't understand where this errors are coming from, how to remove for instance the remote origin to start from scratch again, or how to fix it.
Btw, could you point to good quick reference to bash?
Your question, command sequences and subsequent comments are not adding up. You apparently already have a repository in 'Hello-World' - suggesting you followed the GitHub instructions. But now, when creating OpenSourceContrib, you appear to be in the 'Hello-World' source tree (with .git repository) - hence the 'origin already exists'.
Just start again. Create a new GitHub repository and carefully create your source code tree with local Git repository)
You could also edit the text file .git/config and make your origin remote to point to the right location (here email@example.com:dlib/OpenSourceContrib.git).