git 更换仓库地址

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)

可见,当前仓库地址:[email protected]:Jill/yueshou.git

2、把你本地的项目地址改到最新地址
比如:
git 更换仓库地址_第1张图片

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)

如上已更换为 [email protected]:dankal2188/yueshou.git

你可能感兴趣的:(配置)