没有不值得去解决的问题,也没有不值得去学习的技术!

How to Cherry-Pick a Single Commit (ee8290) From the feature-netease Branch Into develop Using TortoiseGit

View the commits on the develop branch in GitLab. The commit (ee8290) has been merged into the develop branch

1. On the develop branch in the local environment, running a console command produced an error, as shown in Figure 1.

On the develop branch in the local environment, running a console command produced an error:
Figure 1

2. This bug has already been fixed in the single commit (ee8290) on the feature-netease branch, as shown in Figure 2.

3. Therefore, I decided to use TortoiseGit to one-way merge the single commit (ee8290) from the feature-netease branch into the develop branch.

4. View the commits on the develop branch in GitLab, as shown in Figure 3.

View the commits on the develop branch in GitLab
Figure 3

5. View the commits on the feature-netease branch in GitLab, as shown in Figure 4.

View the commits on the feature-netease branch in GitLab
Figure 4

6. In the local repository, switch to the develop branch, right-click, and select TortoiseGit -> Merge, as shown in Figure 5.

In the local repository, switch to the develop branch, right-click, and select TortoiseGit -> Merge
Figure 5

7. Select Commit and click the Browse button, as shown in Figure 6.

Select Commit and click the Browse button
Figure 6

8. Check All branches, select the single commit (ee8290), right-click, and choose Cherry Pick this commit, as shown in Figure 7.

Check All branches, select the single commit (ee8290), right-click, and choose Cherry Pick this commit
Figure 7

9. In the cherry-pick prompt dialog, select the commit (ee8290) and click Continue, as shown in Figure 8.

In the cherry-pick prompt dialog, select the commit (ee8290) and click Continue
Figure 8

10. Conflicts exist. After manually resolving the conflicts, mark them as resolved, as shown in Figures 9 and 10.

Conflicts exist and need to be resolved manually
Figure 9
Mark as resolved
Figure 10

11. In the cherry-pick prompt dialog, click Commit, as shown in Figure 11.

In the cherry-pick prompt dialog, click Commit
Figure 11

12. In the cherry-pick prompt dialog, click Done, as shown in Figure 12.

In the cherry-pick prompt dialog, click Done
Figure 12

13. Right-click, select TortoiseGit -> Push, and the push succeeds, as shown in Figure 13.

Right-click, select TortoiseGit -> Push, and the push succeeds
Figure 13

14. View the commits on the develop branch in GitLab. The commit (ee8290) has been merged into the develop branch, as shown in Figure 14.

View the commits on the develop branch in GitLab. The commit (ee8290) has been merged into the develop branch
Figure 14

15. View the commits on the feature-netease branch in GitLab. There are no changes, as expected, as shown in Figure 15.

View the commits on the feature-netease branch in GitLab. There are no changes, as expected
Figure 15

16. On the develop branch in the local environment, running the console command succeeds, as shown in Figure 16.

On the develop branch in the local environment, running the console command succeeds
Figure 16

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系