I tend to write these so that I do not forget them, and possibly to help others who may be face similar challenges. The question is why would somebody want to do this, well usually its because of a change in Git hosting providers or probably change in project ownership.
The process is as follows:
local-box:change-url ssmusoke$ git remote -v origin https://github.com/ssmusoke/project-repo.git (fetch) origin https://github.com/ssmusoke/project-repo.git (push)
local-box:change-url ssmusoke$ git remote rename origin oldrepo local-box:change-url ssmusoke$ git remote -v oldrepo https://github.com/ssmusoke/project-repo.git (fetch) oldrepo https://github.com/ssmusoke/project-repo.git (push)
local-box:change-url ssmusoke$ git remote add origin https://github.com/ssmusoke/newproject-repo.git local-box:change-url ssmusoke$ git remote -v oldrepo https://github.com/ssmusoke/project-repo.git (fetch) oldrepo https://github.com/ssmusoke/project-repo.git (push) origin https://github.com/ssmusoke/newproject-repo.git (fetch) origin https://github.com/ssmusoke/newproject-repo.git (push)
git remote rm oldrepo