当前位置:网站首页>How to synchronize when the primary and sub warehouses are modified?
How to synchronize when the primary and sub warehouses are modified?
2022-07-29 10:38:00 【furfur-jiang】
When the main warehouse switches branches , How will the sub warehouse be affected ?
Main warehouse switching , The sub warehouse remains unchanged .
This concept is very important , Many people don't understand what this constant means ?
for instance :
set up : The remote master Sub warehouse a edition id yes 111, The remote master Sub warehouse a edition id yes 222.
from master Switch to dev,master There are sub warehouses a edition id yes 111, Switch to dev after , Sub warehouse a edition id still 111, Local and remote are inconsistent .
How can local and remote become consistent ?
git submodule update
After using this command , Meeting Go to remote resynchronization dev Sub warehouse link under Branch
That is to say dev Branch sub warehouse a edition id become 222, Local and remote are consistent
When the main warehouse and sub warehouse are modified , How to synchronize to remote ?
difficulty :dev Sub warehouse and master The sub warehouse version of is different , Direct consolidation will conflict .
Take advantage of the difference between local and remote , You can modify without rollback .
Earlier summary : Normal development should have at least dev Branches and master Branch , You should be in dev Branch to develop , Then merge into master
Specific operation :
First, in the dev: Enter the sub warehouse directory and submit your sub warehouse , All updates to dev Branch , namely add/commit/push Three piece set ( Of sub warehouse master It's the same thing , But first merge), Submit your main warehouse in the same way .
then :
cd Return to the main warehouse , At this time, the main warehouse should be dev Branch ,
Switch to master Branch ,git submodule update At this time, the main warehouse and sub warehouse links are updated to master Of
here ,dev The link of branch sub warehouse is the same as master, Because switching branches will not cause link updates , therefore , You can use this gap , Update the main warehouse ,
next :
git merge dev take dev Merge it , Since the sub warehouse links are consistent, there will be no conflict , After updating the main warehouse , You can modify sub warehouses at the same time ,
Enter the sub warehouse , Switch to master Branch ,( The direct entry branch is the historical submission record ) Return to main warehouse , You can see that there are updates in the sub warehouse , At this point, you can submit to the remote .
As mentioned above , The main sub warehouse has been updated
We should continue the follow-up development. Pay attention
Git checkout dev
Git submodule update
to update dev Sub warehouse link of branch
present situation

First






边栏推荐
- 学习R语言这几本电子书就够了!
- LeetCode二叉树系列——144.二叉树的前序遍历
- 使用tidymodels搞定二分类logistic模型
- [QNX hypervisor 2.2 user manual]7.2.1 hypervisor tracking events
- Use R-Pack skimr to collect the beautiful display of President measurement
- Adcode city code in Gaode map API
- R language brca MRNA data set analysis
- 若依如何实现添加水印功能
- 静态资源映射
- 关系型数据库之MySQL8——由内而外的深化全面学习
猜你喜欢

Review of the 16th issue of HMS core discovery | play with the new "sound" state of AI with tiger pier

一文搞懂什么是二叉树(二叉树的种类、遍历方式、定义)

Oracle advanced (XIV) explanation of escape characters
![[Yugong series] go teaching course 010 in July 2022 - Boolean and character types of data types](/img/3c/eaadcc105377f012db5ee8852b5e28.png)
[Yugong series] go teaching course 010 in July 2022 - Boolean and character types of data types

After eating Alibaba's core notes of highly concurrent programming, the backhand rose 5K

Efficient 7 habit learning notes

转转push的演化之路

Kunlunbase instruction manual (II) best practices for peer-to-peer deployment

数据可视化设计指南(信息图表篇)

皕杰报表之文本附件属件
随机推荐
Create PHP message board system with kubernetes
VMware: use commands to update or upgrade VMware esxi hosts
Luogu p4185 [usaco18jan]mootube g problem solution
Drunken driving alarm system based on stm32
会议OA项目----我的审批
Implementation of college logistics repair application system based on SSM
What are the compensation standards for hospital misdiagnosis? How much can the hospital pay?
使用 RTCGA 临床数据进行生存分析
[HFCTF 2021 Final]easyflask
LeetCode二叉树系列——144.二叉树的前序遍历
Big cloud service company executives changed: technology gives way to sales
Kunlun storage vs PostgreSQL OLTP test
Is there any charge for PDF processing? impossible
主子仓库都修改,如何进行同步?
2022cuda summer training camp day3 practice
Svn revision keyword
Understanding of Arduino circuit
皕杰报表之文本附件属件
Research on the realization of linear gradient circular progress bar
Docker安装Redis、配置及远程连接