xxxxxxxxxx
git remote add origin URL_TO_YOUR_REPO
xxxxxxxxxx
$ git remote -v
$ git remote rm origin
$ git commit -m "your commit"
$ git remote add origin https://github.com/user/repo.git
$ git push -f origin master
xxxxxxxxxx
$git remote -v
myOrigin ssh://git@example.com:1234/myRepo.git (fetch)
myOrigin ssh://git@example.com:1234/myRepo.git (push)
# this will fail because `origin` is not set
$git push origin main
# you need to use
$git push myOrigin main