云点博客-关注全栈开发云点博客

关注全栈开发
提升用户体验

Git更换远程仓库地址

方法一(推荐使用)

git remote -v  #查看远端地址
git remote #查看远端仓库名
git remote set-url origin http://git.com/git/git.git (新地址)

方法二

git remote rm origin #删除远程的仓库
git remote add origin  http://git.com/git/git.git (新地址) #重新添加远程仓库

(还有修改git文件的方式,不推荐使用这种方式,就不写了)

赞(0) 打赏