The use of git cherry-pick in TortoiseGit

在分支 A 中选择待摘取的提交ID

1. Reference: Use of git cherry-pick on the command line

2. Reference: https://tortoisegit.org/docs/tortoisegit/tgit-dug-cherrypick.html .

3. Switch to branch B and extract the commit of branch A to branch B. Display logs. as shown in Figure 1

切换至分支 B 上,将分支 A 的提交摘取至分支 B 上。显示日志
Figure 1

 

4. Click Branch B to select Branch A. as shown in Figure 2

点击分支 B,以选择分支 A
Figure 2

5. Select Branch A, and then select Submit ID from this branch to extract to Branch B. At this point the current branch is still branch B. as shown in Figure 3

选择分支 A,后续从此分支中选择提交ID,以摘取至分支 B。此时当前分支仍然为分支 B
Figure 3

6. Select the commit ID to be picked in Branch A. as shown in Figure 4

在分支 A 中选择待摘取的提交ID
Figure 4

7. Select all and click Continue. as shown in Figure 5

选取全部,点击继续
Figure 5

8. There is a conflict in the process, as shown in Figure 6

过程中出现冲突
Figure 6

9. Right-click the conflict file and use the commit ID to resolve the conflict. Are you sure you label the conflicting file as resolved? Yes. as shown in Figure 7

右键冲突文件,使用提交ID解决冲突。确定将已冲突的文件标注为已解决吗?是
Figure 7

10. Click Submit, as shown in Figure 8

点击提交
8

11. Selection is ignored, as shown in Figure 9

选择忽略
Figure 9

12. The current commit will be empty (for example, due to conflict resolution). Skip this commit or just keep the submission information? skip. As shown in Figure 10

当前提交将是空的(例如,由于解决冲突)。跳过此提交或者只保留提交信息?跳过
Figure 10

13. During conflicts, some conflict files may need to be resolved manually, and step 9 does not apply to all conflict files. For example, a conflicting file already contains some code implementations of other commit IDs. Figure 11, Figure 12

在冲突期间,一些冲突文件,可能需要手动解决,第 9 步骤不适用于所有冲突文件。
Figure 11

 

比如说某个冲突文件中已经包含一些其他提交ID的代码实现。
Figure 12

14. After manually solving the conflict, right-click to solve and submit. as shown in Figure 13

手动解决冲突后,右键 解决、提交
Figure 13

15. It is a merge submission. Which parent node do you want to choose? Figure 14

是一个合并提交。你想挑选哪个父节点?
Figure 14

16. Parent node 1 should be selected: When installing the theme, the configuration item is ignored based on the theme. as shown in Figure 15

应该选择父节点1:安装主题时基于主题忽略配置项入库。
Figure 15

17. Overwrite push to the server.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.