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 my_mail@gmail.com
Next steps:
mkdir OpenSourceContrib
cd OpenSourceContrib
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:dlib/OpenSourceContrib.git
git push -u origin master
Existing Git Repo?
cd existing_git_repo
git remote add origin git@github.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 git@github.com:dlib/OpenSourceContrib.git
I get
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?
Regards.
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)