当前位置:网站首页>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






边栏推荐
- 浅谈安科瑞灭弧式智慧用电在养老机构的应用
- Follow teacher Li to learn online generation - matrix (continuously updated)
- Research on Android multithreading (4) -- from an interview question
- If distributed file storage is realized according to integrated Minio
- 12代酷睿处理器+2.8K OLED华硕好屏,灵耀14 2022影青釉商务轻薄本
- 3道软件测试面试题,能全答对的人不到10%!你会几个?
- Why use markdown to write?
- Object storage
- What are the compensation standards for hospital misdiagnosis? How much can the hospital pay?
- R 语言 BRCA.mRNA数据集 分析
猜你喜欢

MySQL 8 of relational database -- deepening and comprehensive learning from the inside out

若依如何实现添加水印功能

为什么要使用markdown进行写作?

Follow teacher Tian to learn practical English Grammar (continuous update)

HTB-AdmirerToo

DW: optimize the training process of target detection and more comprehensive calculation of positive and negative weights | CVPR 2022
![[paper reading] q-bert: Hessian based ultra low precision quantification of Bert](/img/2d/3b9691c16d89dff1a8ac79105172d4.png)
[paper reading] q-bert: Hessian based ultra low precision quantification of Bert

Learning R language these ebooks are enough!
![[dark horse morning post] Youxian responded to the dissolution every day, and many places have been unable to place orders; Li Bin said that Wei Lai will produce a mobile phone every year; Li Ka Shing](/img/d7/4671b5a74317a8f87ffd36be2b34e1.jpg)
[dark horse morning post] Youxian responded to the dissolution every day, and many places have been unable to place orders; Li Bin said that Wei Lai will produce a mobile phone every year; Li Ka Shing

Data visualization design guide (information chart)
随机推荐
Explore SQL Server metadata (I)
Evolution of xxl-job architecture for distributed scheduling
关系型数据库之MySQL8——由内而外的深化全面学习
R language brca MRNA data set analysis
VMware: use commands to update or upgrade VMware esxi hosts
JVM知识点详细整理(长文警告)
NUMA architecture CPU API change summary
factoextra:多元统计的可视化
ADDS:使用 PowerShell 创建 OU 结构
Comprehensive and detailed SQL learning guide (MySQL direction)
静态资源映射
Luogu p1816 loyalty solution
Is there any charge for PDF processing? impossible
[paper reading] i-bert: integer only Bert quantification
Factoextra: visualization of multivariate statistics
mosquitto_ Sub -f parameter use
R package pedquant realizes stock download and financial quantitative analysis
Vim到底可以配置得多漂亮?
跟着武老师学高数——函数、极限和连续(持续更新)
MySQL优化理论学习指南