添加远程版本库
git remote add [shortname] [url]
git remote add origin https://github.com/xx/hbase.git
git branch -M main
git push -u origin main
查看远程版本库
$ git remote -v
origin https://github.com/xx/hbase.git (fetch)
origin https://github.com/xx/hbase.git (push)
查看某个远程仓库的信息
$ git remote show origin
* remote origin
Fetch URL: https://github.com/xx/hbase.git
Push URL: https://github.com/xx/hbase.git
HEAD branch: (unknown)
重命名远程仓库
$ git remote rename origin hbase
$ git remote -v
hbase https://github.com/\xx/xx.git (fetch)
hbase https://github.com/xx/xx.git (push)
删除远程仓库
$ git remote rm hbase
$ git remote -v
参考
git remote 命令 | 菜鸟教程