git remote add origin <远程仓库URL>
例子:
git remote add origin https://github.com/username/repository.git
如果url不对可以通过一下命令修改url
git remote set-url origin <正确的远程仓库URL>
查看远程仓库
git remote -v
会出现以下内容
origin https://github.com/username/repository.git (fetch)
origin https://github.com/username/repository.git (push)