Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I resolve cherry-pick conflicts using their changes?

Tags:

git

People also ask

How do you resolve a conflict with a cherry-pick?

Points to remember git cherry-pick <commit-hash> to cherry-pick a commit from another branch. git cherry-pick -n <commit-hash> to cherry-pick the commit but it won't commit the changes. It will only stage all the changes. git cherry-pick —continue or git cherry-pick —abort when you face conflicts while cherry-picking.

How do I undo cherry-pick changes in git?

A cherry-pick is basically a commit, so if you want to undo it, you just undo the commit. Stash your current changes so you can reapply them after resetting the commit.


First you should undo your cherry-pick, try to run this

git cherry-pick --abort

Second, try to make cherry-pick, but in this time you get their changes not yours, so make this:

git cherry-pick --strategy=recursive -X theirs {Imported_Commit}