Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

When you try to cherry-pick a commit that is already in the current branch, the message

The previous cherry-pick is now empty, possibly due to conflict resolution.

will be shown.

The meaning of that is clear.

However, the message clearly covers some other situation and I don't understand the other case - possibly due to conflict resolution. How can a conflict resolution make a commit empty?

I agree it is similar, but my question is quite general and it's not about cherry-pick per se. I want to understand, basically, how can a commit disappear in a process of resolving conflicts as the hint implies - possibly due to conflict resolution. – yuranos Feb 9, 2017 at 14:25 You might want to reword the question, then, especially the subject line. E.g., perhaps something like: "how would conflict resolution make a commit empty, so that you need to use --skip during a Git rebase or am?" – torek Feb 9, 2017 at 18:35
  • no change, because the patch was already in ancestors (e.g. when you try to cherry-pick twice)
  • some changes applied
  • conflicts in files
  • If there are conflicts in files, you can edit them, called "conflict resolution". One way of editing them is to remove all the changes that the cherry-pick would have added. When you do so, you end up with no more changes anywhere, but still the cherry-pick being in progress. That's why this hint says "possibly due to conflict resolution".

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid …

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.