1、如果你不清晰当前仓库地址在哪里,可以通过git remote -v
查看当前仓库地址
比如:
git remote -v
origin git@git.coding.net:Jill/yueshou.git (fetch)
origin git@git.coding.net:Jill/yueshou.git (push)
可见,当前仓库地址:git@git.coding.net:Jill/yueshou.git
2、把你本地的项目地址改到最新地址
比如:
git remote set-url origin git@git.coding.net:dankal2188/yueshou.git
3、通过git remote -v
查看当前仓库地址是否更换
比如:
git remote -v
origin git@git.coding.net:dankal2188/yueshou.git (fetch)
origin git@git.coding.net:dankal2188/yueshou.git (push)
如上已更换为 git@git.coding.net:dankal2188/yueshou.git