Search code examples
gitazure-devopscherry-pickgit-cherry-pick

what happens to changes if I abort a cherry pick?


I am using azure devops and I have made changes, but also added a commit message. The only option is to abort the cherry-pick. It will not let me commit even though I have a commit message and changes have been made. What happens to my current changes if I abort it?


Solution

  • I don't know at what version of git this came in, but turns out that as well as:

    git cherry-pick --abort
    

    which will revert to where you were prior to the cherry pick, there is:

    git cherry-pick --quit
    

    which saves you where you currently are. Useful if you have spent some time cherry picking, can't continue but don't want to lose what you have done.