当前位置:网站首页>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 命令即可正常的拉取代码了。
边栏推荐
- Applicable Scenarios of Multi-Master Replication (1) - Multi-IDC
- C语言”三子棋“升级版(模式选择+AI下棋)
- what exactly is json (c# json)
- 01 Encounter typescript, build environment
- TRACE32 - SNOOPer-based variable logging
- Why is the field of hacking almost filled with boys?
- Premiere Pro 2022 for (pr 2022)v22.5.0
- org.apache.jasperException(could not initialize class org)
- The new BMW 3 Series is on the market, with safety and comfort
- Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)
猜你喜欢

The new BMW 3 Series is on the market, with safety and comfort

How useful is four-quadrant time management?

AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware

Ubuntu Topic 5: Setting a Static IP Address

WeChat chat record search in a red envelope

i.MX6ULL驱动开发 | 33 - NXP原厂网络设备驱动浅读(LAN8720 PHY)

mysql black window ~ build database and build table

Word table to Excel

Foreign media right, apple on May be true in inventory

Ubantu project 4: xshell, XFTP connected the virtual machine and set xshell copy and paste the shortcut
随机推荐
Qt practical cases (54) - using transparency QPixmap design pictures
Matlab matrix basic operations (definition, operation)
6-22 Vulnerability exploit - postgresql database password cracking
Ubuntu Topic 5: Setting a Static IP Address
Delete the disk in good condition (recovery partition)
在资源管理类中提供对原始资源的访问——条款15
Kubernetes原理剖析与实战应用手册,太全了
The new BMW 3 Series is on the market, with safety and comfort
Tencent Cloud Deployment----DevOps
JVM参数解析 Xmx、Xms、Xmn、NewRatio、SurvivorRatio、PermSize、PrintGC「建议收藏」
自动化测试如何创造业务价值?
Replication Latency Case (1) - Eventual Consistency
[Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development
mysql黑窗口~建库建表
删除表格数据或清空表格
ES6 类
Doing things software development - the importance of law and understanding of reasonable conclusions
使用 GraphiQL 可视化 GraphQL 架构
Use of radiobutton
小程序:matlab解微分方程「建议收藏」