方法一:通过命令行修改远程地址
> cd json
> git remote set-url origin https://gitee.com/jouypub/json.git
方法二:先删除原有仓库地址,然后添加新地址
> cd json
> git remote rm origin
> git remote add origin https://gitee.com/jouypub/json.git
方法三:修改配置文件
> cd json/.git
> vim config
[core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
precomposeunicode = true
[remote "origin"]
# 修改成新的仓库地址
url = https://gitee.com/jouypub/json.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
网友评论