当前位置:网站首页>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 命令即可正常的拉取代码了。
边栏推荐
- 浏览器自带的拾色器
- 基于Redis(SETNX)实现分布式锁,案例:解决高并发下的订单超卖,秒杀
- [Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development
- TRACE32 - C source code association
- Kubernetes common commands
- 工程力学复习资料
- Snake Project (Simple)
- Destruction order of thread_local variables
- json到底是什么(c# json)
- 对话庄表伟:开源第一课
猜你喜欢
T - sne + data visualization parts of the network parameters
Internet banking stolen?This article tells you how to use online banking safely
C程序是如何跑起来的01 —— 普通可执行文件的构成
01 邂逅typescript,环境搭建
国内市场上的BI软件,到底有啥区别
"Autumn Recruitment Series" MySQL Interview Core 25 Questions (with answers)
[CUDA study notes] First acquaintance with CUDA
Unity 之 图集属性详解和代码示例 -- 拓展一键自动打包图集工具
TRACE32 - SNOOPer-based variable logging
Dialogue with Zhuang Biaowei: The first lesson of open source
随机推荐
What is the difference between BI software in the domestic market?
Snake Project (Simple)
[CUDA study notes] First acquaintance with CUDA
Unity 之 图集属性详解和代码示例 -- 拓展一键自动打包图集工具
11 pinia使用
JVM parameter analysis Xmx, Xms, Xmn, NewRatio, SurvivorRatio, PermSize, PrintGC "recommended collection"
[Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development
Kubernetes common commands
对话庄表伟:开源第一课
How useful is four-quadrant time management?
what exactly is json (c# json)
Deployment应用生命周期与Pod健康检查
The new BMW 3 Series is on the market, with safety and comfort
Ubuntu Topic 5: Setting a Static IP Address
R language test whether the sample conforms to normality (test whether the sample comes from a normally distributed population): shapiro.test function tests whether the sample conforms to the normal d
Why don't you make a confession during the graduation season?
Implementing click on the 3D model in RenderTexture in Unity
ML.NET related resources
Linux查看redis版本(查看mongodb版本)
腾讯云部署----DevOps