git:更改远程仓库指向 remote url

原文地址为: git:更改远程仓库指向 remote url

更改仓库指向:

$ git remote set-url origin [email protected]:test/thinkphp.git

当然,还有一种方法哦,那就是

$ git config -e
直接编辑其中origin的url就行了,退出时记得保存

[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://github.com/x/thinkphp.git
[branch "master"]
remote = origin
merge = refs/heads/master



转载请注明本文地址: git:更改远程仓库指向 remote url

猜你喜欢

转载自blog.csdn.net/xfxf996/article/details/80876108