Git Diagnostic

Fix "fatal: remote origin already exists" in Git

The alias "origin" is already registered to another remote URL in your .git/config file. Running git remote add origin <url> fails because duplicates are disallowed.

fatal: remote origin already exists

Quick Fix Checklist

  1. Inspect existing remote URL: git remote -v
  2. Update the existing URL: git remote set-url origin <new-url>
  3. Or delete old origin first: git remote remove origin && git remote add origin <new-url>