2

I switched to using SSH for my git repository. Somehow, git is still tracking origin-http though. This is annoying, because whenever I want to checkout a remote branch, I can't just run git checkout <branch-name>, I have to do remotes/origin/<branch-name> because there's two repos with that branch name (origin and origin-http)

When I run git remote -v, I see:

origin (fetch)
origin (push)
origin-http (fetch)
origin-http (push)

If I run git remote remove origin-http it appears to do nothing. I.e, when I do git remote right after, it still shows origin-http.

How can I permanently remove origin-http?

For the record, I'm using cmder on Windows10

Peter B
  • 22,460
  • 5
  • 32
  • 69
Ethan Fischer
  • 1,229
  • 2
  • 18
  • 30

1 Answers1

0

Do a git config -l --show-origin and look for any instance of origin-http.

If a branch is tracking origin-http/abranch (instead of origin/abranch), you need to change that too (and not just remove the remote named 'origin-http')

Beside that, look for any hook (.git/hooks/ folder) or .gitattributes directive that would execute automatically (like a pre-commit hook), and add that strangely named remote back.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250