-
查看 remote:
git remote -v -
增加 remote:
git remote add <remote-name> <repository-url><remote-name>: 你为远程仓库取的名字,通常是 origin。<repository-url>: 远程仓库的 URL。这可以是 HTTPS 或 SSH URL,具体取决于你的访问权限和偏好。
-
删除 remote:
git remote remove <remote-name>如
git remote rm origin。这将删除名为origin的远程仓库配置。删除远程仓库配置并不会影响远程仓库本身,它只是从你的本地仓库配置中移除了该远程仓库。 -
修改 remote:
git remote set-url <remote-name> <new-repository-url>