Let's say we have a branch called Master
and another branch called Dev
which is based on Master
.
We have created several branches out of Dev
for different features and it all got merged into Dev
.
Then we merged Dev
into Master
, so now they are similar.
Later on , we had a branch featureA
out of dev and then we merged it into dev.
Then also we had another branch featureC
out of dev and it got merged into dev also.
So now Dev
contains featureA
& featureC
while Master
is not
What we want to do is include only the changes made on featureC
into Master
.
So I thought of using cherry-pick
on Master
. However when I do so , it shows that there's a conflict and when I review it , it actually showing me all the changes made in featureA
& featureC
on the source(dev) and I can only add them all to target (master)
You can see below pic for demonstration. I made a small example for better understanding , I can only check both of the commits
So now I have to add all the changes (from A & C) , then remove changes that were made in feature A , this is very risky to do , I believe
am I doing something wrong? because I don't see any benefits of using cherry-pick? The main usage of it is to pick a specific commit from one branch into another and that's not the case above.