1、切换远程仓库地址:
方式一:修改远程仓库地址
【git remote set-url origin URL】 更换远程仓库地址,URL为新地址。
ps:此方法修改切换仓库后不用关联分支 直接可以pull 和push
方式二:先删除远程仓库地址,然后再添加
【git remote rm origin】 删除现有远程仓库
【git remote add origin url】添加新远程仓库
ps:此方法需要重新关联分支:git branch --set-upstream-to=origin/远程分支 本地分支
2、查看远程仓库的地址
【git remote -v 】