The following command will set the remote origin URL for the current working git repository

For SSH, it will look like this

$ git remote set-url origin git@github.com:username/repo.git

For HTTPS, it will look like this

$ git remote set-url origin https://github.com/username/repo.git