I tried to do a git cherry-pick
, but it failed with a conflict:
$ git cherry-pick master
error: could not apply 456190d... Mejoro el post
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
I was missing merge
some previous commits to be able to cherry-pick
read that last one, and so I did reset
to undo the changes and be able to apply the merge
:
$ git status --short
DU source/images/uploads/2016/review.png
$ git reset .
$ git status --short
?? source/images/uploads/2016/review.png
$ git clean -fd
Removing source/images/uploads/2016/review.png
But merge
he fails:
$ git merge origin/stable
fatal: You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).
Please, commit your changes before you merge.
What is the correct way to solve the conflict?
I know I can do rm .git/CHERRY_PICK_HEAD
and get around the problem, but I imagine there will be a more correct way to do it.
the shape is
this reverts the repository to the previous state.
This option is available since version 1.7.8, from mid-2013.
After resolving a conflict in the rebase and cherry-pick commands, you need to tell Git that the conflict is resolved. In the case of cherry-pick, the command is as follows:
After this, you will no longer have problems merging.