命令行:
git remote命令中有个子命令叫set-url。
文档如下:
git remote set-url [--push]
git remote set-url --add [--push]
git remote set-url --delete [--push]
set-url
Changes URL remote points to. Sets first URL remote points to matching regex
doesn't match any URL, error occurs and nothing is changed.
With --push, push URLs are manipulated instead of fetch URLs.
With --add, instead of changing some URL, new URL is added.
With --delete, instead of changing some URL, all URLs matching regex
所以改远端url的命令应该是:
git remote set-url origin xxx.git