Original chapter reference: Chapter 58: Change git repository name. The command options and documentation recipes below are fully transcribed from Git Notes for Professionals.
If you change repository name on the remote side, such as your github or bitbucket, when you push your exisiting code, you will see error: Fatal error, repository not found**.
Section 58.1: Change local setting
Go to terminal,
Source example · PDF page 183
cd projectFolder
git remote -v (it will show previous git url)
git remote set-url origin https://username@bitbucket.org/username/newName.git
git remote -v (double check, it will show new git url)
git push (do whatever you want.)