美文网首页
【GIT】远端仓库地址修改时如何修改本地的地址

【GIT】远端仓库地址修改时如何修改本地的地址

作者: 进击的阿达 | 来源:发表于2021-03-03 15:46 被阅读0次
问题:在拉取代码或提交代码的时候出现一下异常
15:32   Update failed
        remote: �[31mRepository Not Found�[0m
        repository 'https://gitee.com/****/dx_mall_2b.git/' not found
原因:之前修改了gitee仓库的远程地址,本地没有更新
解决方法:

第一步:使用 git remote 命令查看仓库名称,一般默认为 origin
第二部:使用 git remote set-url [仓库名] [新地址] 修改目标仓库地址

我的仓库名称为 origin ,新地址为 http://gitee.com/****/dx_mall_2b.git ,修改步骤如下:

E:\Web Project\dx_mall_2b>git remote
origin

E:\Web Project\dx_mall_2b>git remote set-url origin https://gitee.com/****/dx_mall_2b.git

相关文章

网友评论

      本文标题:【GIT】远端仓库地址修改时如何修改本地的地址

      本文链接:https://www.haomeiwen.com/subject/ycgqqltx.html