I'm relatively new to git and I think I've painted myself into a corner. In order to test some functionality; I copied and pasted over a repo directory locally (I know - absolute wrong thing to do. I wasn't thinking). I have since been working and creating branches - progress that I'd like to keep. Of course, when I tried to set up a new repo and push to it... my local repo wants to push to the old remote.
Is there a way to change the name of the existing local repo (that I copied) to the name of the newly created, empty, remote one so that when I do a push, it will go to the new remote? I don't want to overwrite the file since I need to keep the branches.
I have tried:
git remote add origin https://github.com/my-github-username/mygithubrepo.git
...thinking that I could overwrite the repository url with the new info - but it gave me the error:
fatal: remote origin already exists.
...Which in hindsight is a good thing. I'm glad this didn't work, as I DO NOT want to modify the original remote repo in any way whatsoever. Like I said... I'm new to git.
Any advice or help would be greatly appreciated. Thanks in advance!