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

问题:在拉取代码或提交代码的时候出现一下异常
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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容