Difficulty in pushing a repo from git

I’ve got a working repository on git, and I’m hoping to migrate it to github.

I followed the advice given, created a new repo ‘books’, and this is what happened in Terminal:

$ git remote add origin https://github.com/John-Wheater/books.git
fatal: remote origin already exists.

My github experience is very limited, and I’d like to see a document, or get advice, on how to do this apparently simple job. I’ve searched here, but unsuccessfully.

Hi @John-Wheater, welcome to the community, we are happy you are here!

The error you’ve mentioned indicates you’ve tried to add a remote with a name that already exists in your local repository, you can correct this by:

Here is some additional reading that you might find useful:

1 Like

I had tried that actually, without much luck.

I appreciate your kind advice, even though it just repeated the error message. The problem is that you underestimated my ignorance!:-). I know what a repo is, and have used git successfully. And I can make a new repo on github, nominating the files to be used. But I’ve no idea what ‘origin’ and ‘remote’ really mean.

What I wanted to do was to make a new github repo based on the files in an existing git repo, and then discard the git repo. If there’s an easy way of doing this, please point me at it. If not, I can either just carry on using git, or do a new repo and specify all the files again.

I thought the instructions in ‘Create’ would do what I want, but instead I find myself in the middle of a horrid muddle.