当前位置:网站首页>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
边栏推荐
- Online customer service chat system source code_ Beautiful and powerful golang kernel development_ Binary operation fool installation_ Attached construction tutorial
- Online customer service system code_ H5 customer service_ Docking with official account_ Support app_ Support for multiple languages
- B_ QuRT_ User_ Guide(32)
- Redis' transaction and locking mechanism
- 交易所系统开发如何开发?数字货币交易所系统开发成熟技术案例
- "Team training competition" Shandong multi university training 3
- leetcode:104. Maximum depth of binary tree
- 后疫情时代,云计算如何为在线教育保驾护航
- d编译时计数
- Online education program user login and registration
猜你喜欢

Mysql:sql overview and database system introduction | dark horse programmer

Online customer service system code_ H5 customer service_ Docking with official account_ Support app_ Support for multiple languages

2022中国国潮发展新动向

10 airbags are equipped as standard, and Chery arizer 8 has no dead corner for safety protection

Introduction to machine learning compilation course learning notes lesson 2 tensor program abstraction

JVM Part 21 of interview with big companies Q & A

Redis - 01 cache: how to use read cache to improve system performance?

Classic case of multithreading

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

MFC interface library bcgcontrolbar v33.0 - desktop alarm window, grid control upgrade, etc
随机推荐
What does the software test report contain? How to obtain high quality software test reports?
手机上怎么开股票账户?另外,手机开户安全么?
理想中的接口自动化项目
AtCoder Beginner Contest 257
dba
有孚网络混合云,加速企业数字化转型升级
Store Nagios monitoring information into MySQL
B_ QuRT_ User_ Guide(35)
Tencent has been conducting advanced automated functional testing for 3 years. It is a gift to you who are confused in manual testing
Introduction to digital transformation solutions for enterprises going to sea
Cas classique multithreadé
The superficial understanding of the industrial Internet finally brought the development of the industrial Internet into the strange circle of the consumer Internet
"More Ford, more China" saw through the clouds, and the orders of Changan Ford's flagship products exceeded 10000
"Team training competition" Shandong multi university training 3
KVM IO performance test data
[Android, kotlin, tflite] mobile device integration deep learning light model tflite (object detection)
Label Contrastive Coding based Graph Neural Network for Graph Classification
B_ QuRT_ User_ Guide(32)
[career planning for Digital IC graduates] Chap.1 overview of IC industry chain and summary of representative enterprises
Discuz forum speed up to delete XXX under data/log PHP file