Background :
During the R&D stage, different R&D personnel A and B merged the functions they developed into the same branch. However, this online content does not require the functions of R&D personnel B. Therefore, code stripping is required to extract the functions of R&D personnel A.
git command : git cherry-pick
Operation steps :
1. Check the git submission record of branch A, and record the version record number of the log that needs to be merged;
(commitid :30bcb1b5)
2. Cut a new branch B from branch A, and roll back branch B to the previous version ( this operation is to solve the problem described in the above background. If you just merge into branch B, you can directly switch branches without freshly cut branches )
3. Use the git cherry-pick 30bcb1b5 command to merge the submission records of branch A to branch B. At this time, the merge is only performed locally and needs to be pushed to the remote branch.
1. Find the commit record of branch A and find the commitid of the log that needs to be merged.
2. Execute git merge command
3. Screenshot of the results merged into branch B