目录
方法一、修改本地仓库地址
#进入项目根目录
git remote set-url origin [url]
方法二、通过命令先删除再添加远程仓库
#进入项目根目录
git remote rm origin
git remote add origin [url]
方法三、修改配置文件
#进入项目根目录/.git
$ vim config
[core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
precomposeunicode = true
[remote "origin"]
url = http://192.168.100.235:9797/shimanqiang/assistant.git #更新为最新仓库地址
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
标签:origin,git,remote,仓库,url,切换,根目录
From: https://www.cnblogs.com/brucejiao/p/16589459.html