git切换远程仓库地址

源码服务器切换,idea上可以直接修改remotes地址,然后push一次即可。

 前端源码使用vscode,不好按上述方式直接切换,使用git命令即可

 1,--切换远程仓库地址

  git remote set-url origin "realUrlAddress"

2,-远程仓库地址切换后,本地代码上传
  git push -u origin --all
  git push -u origin --tags

完成上述两步,实现了前端源码同步到git远端。

这里的切换,没有指定特殊分支,都是origin/master

原文地址:https://www.cnblogs.com/havenenjoy/p/12922475.html