当前位置:网站首页>gerrit中如何切换远程服务器
gerrit中如何切换远程服务器
2022-07-31 15:45:00 【码龙-】
当你使用的远程服务器要更换的时候,即代码转移到新的gerrit服务器上了,是否一定需要重新配密钥,且需要重新拉代码呢。其实大可不必,重新拉一份代码太大费周章了,使用命令切换远程服务器即可。
以下是一个从192.168.8.67切换到192.168.1.80远程服务器的例子。
首先第一步,查看你当前的远程服务器地址:
使用git remote -v查看当前URL:

使用git remote -v命令后 可以看出当前的远程服务器为192.168.8.67,即当你使用git push 命令的时候,本地改动会提交到的远程服务器地址。
第二步:
使用git remote set-url origin <URL>重新设置URL。

使用git remout set-url origin <URL>改了响应的地址之后,再使用git remoute -v 查看当前的远程服务器地址,可以发现已经切换到192.168.1.80了。
第三步:
在第二步中已经成功的切换了远程服务器,此时使用git pull 命令即可正常的拉取代码了。
边栏推荐
- 更新数据表update
- SQL、HQL、JPQL 到底有什么区别
- Handling write conflicts under multi-master replication (4) - multi-master replication topology
- 全新宝马3系上市,安全、舒适一个不落
- How useful is four-quadrant time management?
- Efficient use of RecyclerView Section 1
- R language ggplot2 visualization: use the ggmapplot function of the ggpubr package to visualize the MA plot (MA-plot), the font.legend parameter and the font.main parameter to set the title and legend
- Destruction order of thread_local variables
- Doing things software development - the importance of law and understanding of reasonable conclusions
- Use of radiobutton
猜你喜欢
随机推荐
删除表格数据或清空表格
6-22 Vulnerability exploit - postgresql database password cracking
Ubantu project 4: xshell, XFTP connected the virtual machine and set xshell copy and paste the shortcut
工程水文学试卷
Word table to Excel
Grafana安装后web打开报错
Applicable scenario of multi-master replication (2) - client and collaborative editing that require offline operation
radiobutton的使用
The normal form of the database (first normal form, second normal form, third normal form, BCNF normal form) "recommended collection"
基于ABP实现DDD
Linux查看redis版本(查看mongodb版本)
小程序:matlab解微分方程「建议收藏」
工程流体力学复习
【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
BGP综合实验(建立对等体、路由反射器、联邦、路由宣告及聚合)
Tencent Cloud Deployment----DevOps
.NET 20周年专访 - 张善友:.NET 技术是如何赋能并改变世界的
ASP.NET Core generates continuous Guid
Ubuntu Topic 5: Setting a Static IP Address
Replication Latency Case (1) - Eventual Consistency









