git修改远程仓库地址

方法有三种:

方法1.修改命令

git remote set-url origin <url>

方法2.先删后加

git remote rm origin
git remote add origin [url]

方法3.直接修改config文件

在这里插入图片描述
config:

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
	hideDotFiles = dotGitOnly
[remote "origin"]
	url = https://github.com/ZhangDi-d/SpringBootSample.git
	fetch = +refs/heads/*:refs/remotes/origin/*

原文地址:https://www.cnblogs.com/DiZhang/p/12544775.html