git 更换仓库地址

来源:互联网 发布:合肥java工资待遇 编辑:程序博客网 时间:2024/05/21 22:40

1、如果你不清晰当前仓库地址在哪里,可以通过git remote -v 查看当前仓库地址
比如:

git remote -vorigin  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 -vorigin  git@git.coding.net:dankal2188/yueshou.git (fetch)origin  git@git.coding.net:dankal2188/yueshou.git (push)

如上已更换为 git@git.coding.net:dankal2188/yueshou.git

0 0