1.修改命令
git remote set-url origin [url]
例:git remote set-url origin git@github.com:yangsanning/StatusBarUtils.git
2.先删后加
git remote rm origin
git remote add origin [url]
例:git remote add origin git@github.com:yangsanning/StatusBarUtils.git
3.直接修改.git文件夹下的config文件
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[submodule]
active = .
[remote "origin"]
url = https://github.com/yangsanning/StatusBarUtils.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
网友评论