git 使用 TortoiseGit 挑选樱桃

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9415534/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 13:02:24  来源:igfitidea点击:

Cherry pick using TortoiseGit

gittortoisegit

提问by antonjs

How do I run the cherry pick command using TortoiseGit UI?

如何使用 TortoiseGit UI 运行cherry pick 命令?

回答by vpatil

  1. Open the log in a repository with the targetbranch checked out.
  2. Use the top-left blue branch name to select the sourcebranch.
  3. Select the commit(s) you want.
  4. Right click and select Cherry Pick this commit.
  1. 在检出目标分支的存储库中打开日志。
  2. 使用左上角的蓝色分支名称选择分支。
  3. 选择您想要的提交。
  4. 右键单击并选择Cherry Pick this commit

回答by Ashraf Alam

Considering 'release' branch is required to cherry-pick from 'master' branch, follow the steps as provided below:

考虑到 'release' 分支需要从 'master' 分支中挑选,请按照以下步骤操作:

Step 1: Checkout 'release' branch

第 1 步:结帐“发布”分支

enter image description here

在此处输入图片说明

Step 2: Click TostoiseGit -> Show log

第二步:点击 TostoiseGit -> Show log

enter image description here

在此处输入图片说明

Step 3: Filter Source Branch Commits to be Cherry-picked

第 3 步:过滤源分支提交为 Cherry-picked

On the Log Messages window, select the source branch from where the commits will be Cherry Picked (i.e. 'master' branch in this example). The branch selection can be done from top left of the 'Log Messages' window (as shown below)

在 Log Messages 窗口中,选择 Cherry Picked 提交的源分支(即本例中的“master”分支)。分支选择可以从“日志消息”窗口的左上角完成(如下所示)

enter image description here

在此处输入图片说明

Step 4: Select the Commits to be Cherry-picked

第 4 步:选择要挑选的提交

Finally select the commits and right-click the context menu to cherry-pick them.

最后选择提交并右键单击上下文菜单以挑选它们。

enter image description here

在此处输入图片说明

回答by YATENDRA SHARMA

The above answers are also correct and I am just simplifying it.

上面的答案也是正确的,我只是在简化它。

If you want to cherry pick from one branch to another (for example: Branch_18.1 to Branch_18.4)

如果你想从一个分支到另一个分支(例如:Branch_18.1 到 Branch_18.4)

  • Go to Branch_18.4 folder(repo)
  • Right click and select show log, it will open a log dialog window
  • In this window, at top left Corner click on Current branch Hyperlink (i.e. Branch_18.4)
  • Now select the branch from which you want to cherry pic (i.e. Branch_18.1)
  • Now select and right click on the commit which to be cherry picked and select Cherry pick selected commits.
  • Now It may ask you to stash your changes if you have any changes in your working tree then in that case click on "YES" .
  • Now Before pushing cherry picked changes, pull and then Push.
  • 转到 Branch_18.4 文件夹(repo)
  • 右键单击并选择显示日志,它将打开一个日志对话框窗口
  • 在此窗口中,在左上角单击 Current branch Hyperlink(即 Branch_18.4)
  • 现在选择你想要樱桃图片的分支(即 Branch_18.1)
  • 现在选择并右键单击要挑选的提交,然后选择 Cherry pick selected commits。
  • 现在,如果您的工作树有任何更改,它可能会要求您隐藏更改,然后在这种情况下单击“是”。
  • 现在在推送之前选择的更改,先拉,然后再推送。