I can not create origin remotely with remote
command:
$ git remote add origin https://github.com/LongKnight/git-basics.git fatal: remote origin already exists.
To solve the error, I have tried this:
$ git remote -v origin $ git remote -v show origin
It is not uploading the files from my local repository to the remote:
$ git push -u origin master fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Does each repository have its own origin?
Solution: I was using the Powershell that came with Github or Git Shell as it is also called to do my tutorial, once I switched to Git Bash it worked fine.
Conclusion. The Git fatal: remote origin already exists error is caused by creating a remote called “origin” when one already exists. To fix this error, replace the URL of your existing origin using the git remote set-url command.
"Remote origin already exists" error The error `fatal: remote origin already exists` is caused when you attempt to create a link to a remote repository called “origin” when a remote link with that name is already configured.
A bit easier:
git remote set-url origin https://github.com/LongKnight/git-basics.git
That will replace the current origin with a new one.
try this
git remote rm origin
then,
git remote add origin https://yourLink
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With