I'm attempting to update the remote url for my repo using:
git remote set-url origin https://newserver/root/repo.git
The expected result should be:
git remote -v
origin http://newserver/root/repo.git (fetch)
origin http://newserver/root/repo.git (push)
however regardless of what I try, and what articles I look at online, what I actually get as a result is something like this:
git remote -v
origin http://oldserver/root/repo.git (fetch)
origin http://oldserver/root/repo.git (push)
origin http://newserver/root/repo.git (push)
When I try to use
git remote rm origin
It removes the new/third entry, yet leaves the other original entries for some reason. So I see:
git remote rm origin
git remote -v
origin http://oldserver/root/repo.git (fetch)
origin http://oldserver/root/repo.git (push)
After this, if I open the .git/config in vi, there's no entries at all. Manually adding the new server as origin in the config file yields the same result - I see the two old servers as fetch and push, and a third new entry which is also listed as origin/push.
What am I doing wrong? I have tried searching high and low, yet because of the terminology I'm not sure if I'm searching for the right information. Thanks!