命令不删除远程仓库修改
# 查看远端地址
git remote -v
# 查看远端仓库名
git remote
# 重新设置远程仓库
git remote set-url origin https://gitee.com/xx/xx.git (新地址)
.git配置config文件修改
修改 .git 隐藏文件夹下的 config 文件内容,将 [remote "origin"]下的url 修改成你需要替换的新地址
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = [email protected]:xxx/xxx.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
标签:origin,git,remote,仓库,地址,false,远程
From: https://www.cnblogs.com/yu-si/p/18228944