方式1: 命令修改
git remote set-url origin [url]
方式2: 命令,先删除后添加新地址
git remote rm origin git remote add origin [url]
方式3: 直接修改配置文件(推荐)
文件位置:git \ config
config
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true [remote "origin"] url = http:// 更新的地址 fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master