How to do git cherry-pick --continue in SourceTree?

59,719

Solution 1

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.

Solution 2

Create a custom action as such

git cherry-pick --continue --no-edit
Share:
59,719

Related videos on Youtube

szym
Author by

szym

Software developer.

Updated on July 09, 2022

Comments

  • szym
    szym almost 2 years

    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?

  • Edward Thomson
    Edward Thomson almost 10 years
    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.
  • Sascha Wolf
    Sascha Wolf almost 10 years
    @EdwardThomson You're right. I totally forgot that you can cherry pick multiple commits since I never do this. Thanks for the heads up.
  • Raffi Khatchadourian
    Raffi Khatchadourian almost 9 years
    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 jira.atlassian.com/browse/SRCTREE-3133.
  • Valmond
    Valmond over 7 years
    Actually, to nit-pick, it's not cherry-pick --continue but git cherry-pick --continue. Sometimes helpful for us noobs out there.
  • ICTMitchell
    ICTMitchell almost 7 years
    How do you even cherry-pick several commits in SourceTree btw?
  • Sascha Wolf
    Sascha Wolf almost 7 years
    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.
  • Kevin Holt
    Kevin Holt over 6 years
    Merge and cherry-pick are different operations. Merge leaves the history of the merged commit(s) intact. Cherry-pick lifts the desired commit(s) out of their existing history and essentially applies a fresh copy of that diff onto the current head. Cherry picking is nice if you want to steal one small aspect of a branch without merging in everything from that branch.
  • Maryadi Poipo
    Maryadi Poipo over 6 years
    Ok... Thank you Mr. @KevinHolt
  • moudrick
    moudrick about 6 years
    if you often need running git cherry-pick --continue in SOurceTree, you can create a Custom Action for this.