怎么更改git仓库地址

发布时间 2023-10-07 09:33:42作者: 2086nmj

1. 显示当前Git仓库的远程仓库地址

git remote -V

2. 更改Git仓库的远程仓库地址

git remote set-url origin [new-remote-url]

3. 验证是否更改成功,显示Git仓库的远程仓库地址

git remote -v

4. 将更改后的代码提交到新的远程仓库地址

git push origin master

参考:https://www.php.cn/faq/506213.html