1

I made a mess of my git settings. When I check my remote settings with

git remote -v

I get

origin  https://cx1964:[email protected]/cx1964/home_claude_bin_scripts.git (fetch)
origin  https://cx1964:[email protected]/cx1964/home_claude_bin_scripts.git (push)
origin  https://github.com/cx1964/cx1964Repos_fastAPI_React_Redis.git (push)

But I want

origin  https://github.com/cx1964/cx1964Repos_fastAPI_React_Redis.git (fetch)
origin  https://github.com/cx1964/cx1964Repos_fastAPI_React_Redis.git (push)

How can I achieve this?

  • 2
    Use [`git remote set-url`](https://git-scm.com/docs/git-remote) to manage the remotes. – axiac Apr 08 '22 at 13:55
  • 1
    @user2588998 It seems to me like your repo is in a weird state. I would tackle this by manually editing `.git/config`, or at least inspecting it. You might need to clean up what appears under `[remote "origin"]` in there. – joanis Apr 08 '22 at 15:01
  • 1
    In fact, it might be helpful if you add to the question what appears under `[remote "origin"]` in that repo's `.git/config` file, it's likely to be informative. – joanis Apr 08 '22 at 15:06

1 Answers1

0

git remote remove origin to delete your current origin remote then recreate it with

git remote add origin https://github.com/cx1964/cx1964Repos_fastAPI_React_Redis.git

you can also change the remote url with

git remote set-url origin https://github.com/cx1964/cx1964Repos_fastAPI_React_Redis.git
SuperRem
  • 16
  • 2