当前位置:网站首页>How to mention hot fix and cherry pick
How to mention hot fix and cherry pick
2022-06-30 22:43:00 【Small white eye】
Catalog
hot-fix
What is it? : Hot repair .
Generally speaking, it's , When developing , Production environment prod What small problems need to be modified , We will mention hot-fix Solve .
What do I do : from pro Pull a temporary Branch , Then switch locally to the temporary Branch , Make changes , When it's over pro that will do .
for instance :
1. In a remote warehouse pro Branch office , The new branch , It can be named hot-fix630
2. Switch to temporary Branch git checkout -b origin/hot-fix630
3. Make changes , then push To the far end
cherry-pick
What is it? : Picking up cherries
Generally speaking, it's , When developing , From the last release to pro Already in dev Several new functions have been added to the environment , Submitted many times ( It is recommended that only one function be designed for each submission ); Now we need to push one of these functions to the production environment pro.
What do I do : Select a few of them commit push to pro, If a submission involves multiple functions , The code of redundant functions should be commented or deleted .
Be careful : If multiple people develop the same page , In principle, you can't touch other people's code ! If others are also involved in the submission of certain functions , It needs to be handled in person .
If every time commit They are very standard ( Only a single function is involved ) Then you can use git command :
// Merge once commit; -x It saves , If retained, the original submitter can be retained commit Information .
git cherry-pick -x <commit id>
// Merge many times commit; Closed interval
git cherry-pick <start-commit-id>^..<end-commit-id>
If a submission involves multiple functions , You can only manually annotate or delete the code of redundant functions .
Conflict handling
The above process , There is a good chance of conflict , Because the code you are currently submitting in team collaboration , May be related to the current pro The code is different somewhere above ( Last submitted by others ), Your submission will conflict at this time , The solution process is as follows :
// See which files are in conflict
git status
// Find the conflict , Manually modify
vim xxx.jsx
// Add the file to the cache
git add xxx.jsx
// Submit push
git commit -m 'fix: Modify conflict '
git push
If you start from dev Merge code into pro conflict , You need to switch to pro Branch pull At present dev Code for , Then resolve the conflict before push To the far end pro Environmental Science
边栏推荐
- How to develop the exchange system? Mature technology case of digital currency exchange system development
- Discuz forum speed up to delete XXX under data/log PHP file
- Apache server OpenSSL upgrade
- 电脑设备管理器在哪里可以找到
- 部门新来了个阿里25K出来的,让我见识到了什么是天花板
- KVM IO performance test data
- msf之ms17-010永恒之蓝漏洞
- d编译时计数
- MIT博士论文 | 优化理论与机器学习实践
- D compile time count
猜你喜欢

与AI结对编程式是什么体验 Copilot vs AlphaCode, Codex, GPT-3

理想中的接口自动化项目

Swift5.0 ----Swift FrameWork的创建及使用

What does project management really manage?

What if the taskbar is blank after win11 update? Solution to blank and stuck taskbar after win11 update

latex左侧大括号 latex中大括号多行公式

Tencent has been conducting advanced automated functional testing for 3 years. It is a gift to you who are confused in manual testing

In depth analysis of Apache bookkeeper series: Part 4 - back pressure

JVM Part 21 of interview with big companies Q & A

Online customer service chat system source code_ Beautiful and powerful golang kernel development_ Binary operation fool installation_ Attached construction tutorial
随机推荐
D compile time count
latex字母头顶两个点
后疫情时代,云计算如何为在线教育保驾护航
B_ QuRT_ User_ Guide(32)
Redis' cache penetration, cache breakdown and cache avalanche
Introduction to machine learning compilation course learning notes lesson 2 tensor program abstraction
B_ QuRT_ User_ Guide(35)
Wechat applet transmits parameters (data-) by clicking events
十个最为戳心测试/开程序员笑话,念茫茫人海,该如何寻觅?
有孚网络混合云,加速企业数字化转型升级
What does project management really manage?
Strictly minor spanning tree
【Android,Kotlin,TFLite】移动设备集成深度学习轻模型TFlite(物体检测篇)
严格次小生成树
[micro service ~nacos] configuration center of Nacos
软件确认测试的内容和流程有哪些?确认测试报告需要多少钱?
latex中 & 号什么含义?
去中心化交易所系统开发技术原理丨数字货币去中心化交易所系统开发(说明案例)
Where can I find the computer device manager
与AI结对编程式是什么体验 Copilot vs AlphaCode, Codex, GPT-3