git 远程仓库地址改变后本地连接的操作

遇到了一个情况:git 远程仓库迁移了。

然后本地的项目,要重新连新的远程仓库。

先我们在新的仓库的管理中心把自己的rsa 公钥加上。

然后,本地运行命令:

 git remote remove origin
git remote add origin git@xxx:xxx.git(远程项目地址)

然后就可以重新使用

git pull origin master
git push origin master

进行提交拉取等操作了。

猜你喜欢

转载自blog.csdn.net/purple_lumpy/article/details/89358420