Help! Stuck with adding a remote origin to github


#1


This is the lesson I am stuck on.
https://www.codecademy.com/en/courses/deploy-a-website/lessons/github-pages/exercises/add-remote

I have been trying to get past one instruction(wich won't load). It's telling me to:
git remote add origin https://github.com/your-user-name/your-user-name.github.io.git. This is what it says when I type it in:

$ git remote add origin https://github.com/jakejacobs1/jake-jacobs-1/jake-jacobs-1.github.io.git
fatal: remote origin already exists
Did I do something wrong?
Thanks.
.


Replace this line with your code.


#2

Have you read the reason git is giving you for not adding the new remote? Based on that feedback, what options do you think you have?


#3

I had the same problem after I had a typo when I first entered that line. I ran "git remote rm origin" and then was able to successfully get the command to run.


#4

It says when I remove remote origin and then create the remote again:
fatal: Not a git repository (or any of the parent directories): .git


#5

And what would cause your location not to be a git repository? Changing directory or deleting the repo comes to mind. What can you do to find out which is the case and what can you do to solve that problem?
I get the feeling that you aren't considering what feedback you get from git. It's telling you what the problems are, you just need to read that and decide what to do about it.


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.