28

How do I continue cherry picking using SourceTree after I resolved conflicts?

If I am doing rebase and I get conflicts then after resolving them when I click commit SourceTree lets me continue that rebase. But how to continue cherry pick operation?

pkamb
  • 33,281
  • 23
  • 160
  • 191
szym
  • 3,028
  • 2
  • 20
  • 32

2 Answers2

48

cherry-pick effectively applies the changes from commit A onto the working tree and makes a commit. This means if you get any conflicts during cherry-picking you need to commit after resolving them to finish the cherry-pick.

EDIT Edward noted that this is only true when you are cherry-picking a single commit. When picking multiple commits you can run git cherry-pick --continue from the console. I'm not sure if you can do this directly via SourceTree.

Sascha Wolf
  • 18,810
  • 4
  • 51
  • 73
  • 1
    No, that's only true when you cherry pick a single commit; `cherry-pick --continue` is what you need to run when you are cherry picking multiple commits. – Edward Thomson Aug 15 '14 at 12:18
  • @EdwardThomson You're right. I totally forgot that you can cherry pick multiple commits since I never do this. Thanks for the heads up. – Sascha Wolf Aug 15 '14 at 12:27
  • If you look at the console, "fix conflicts and run "git cherry-pick --continue." When fixing conflicts the normal way (without the cherry-pick), the console will mention to commit (after the conflicts have been fixed). As such, even with a single cherry-pick, I think that `git cherry-pick --continue` is the way to go. I filed https://jira.atlassian.com/browse/SRCTREE-3133. – Raffi Khatchadourian Aug 21 '15 at 21:20
  • 1
    Actually, to nit-pick, it's not `cherry-pick --continue` but `git cherry-pick --continue`. Sometimes helpful for us noobs out there. – Valmond Nov 28 '16 at 13:52
  • How do you even cherry-pick several commits in SourceTree btw? – Macke Aug 04 '17 at 12:31
  • My answer isn't really specifically about SourceTree. I'm a command line purist and don't use a GUI to work with git, so sadly I can't help you. – Sascha Wolf Aug 07 '17 at 07:59
  • if you often need running `git cherry-pick --continue` in SOurceTree, you can create a Custom Action for this. – moudrick May 18 '18 at 16:16
  • run: git commit – Minh Nguyen Oct 25 '22 at 16:11
21

Create a custom action as such

git cherry-pick --continue --no-edit
Bowofola
  • 1,132
  • 9
  • 12