Fix · GitHub and Git
error: remote origin already exists
What you may see
- I tried to connect a repository and it says origin already exists
Most likely cause
This folder is already connected to a GitHub address; you tried to add a second one with the same name.
Check first (about two minutes)
- Run git remote -v to see where origin points now.
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Run git remote -v and show me.
- If origin already points to the right address, do nothing more. If it points to the wrong one, change it with git remote set-url origin <address>.
- Check with git ls-remote origin.
Do not do this
- Do not remove origin if you do not know where it should point.
- Do not delete the .git folder.