change a remote url for git push code example
Example 1: change remote url git
git remote set-url origin https://hostname/USERNAME/REPOSITORY.git
Example 2: git push new repo to remote
$ git remote add origin <remote repository URL>
# Sets the new remote
# Push the changes in your local repository to GitHub.
$ git push -u origin master
# Pushes the changes in your local repository up to the remote repository you specified as the origin