git修改远程地址

远程仓库地址修改后,如何修改git远程仓库地址,方法如下:

方法1

直接更新新地址

git remote set-url origin URL   // 更换远程仓库地址,URL为新地址

方法2

先删除现有地址,在添加新地址

git remote rm origin  // 删除现有远程仓库
git remote add origin url   // 添加新远程仓库

猜你喜欢

转载自blog.csdn.net/xiaopihair123/article/details/129078611
今日推荐