Question

Situation: I have a topic branch which has been squashed into master. I then added some additional commits to the topic branch and want to merge these additional commits into master. Is there any way to do this?

Graph:

master A - B - F

             \

topic          C - D - E (squashed into F) - G - H

Question -- How to get G and H onto F?

My takeaway from Rebasing after squash merge? has been to update the topic branch parent after a squash so as to avoid this situation all together. My solution for now to unstick myself has just been to create a patch containing my new changes and apply this patch to master, but I'm losing commit history doing this, so it's not ideal.

Thanks!

Was it helpful?

Solution

if I understand you correctly the way of doing this is cherry-picking: https://ariejan.net/2010/06/10/cherry-picking-specific-commits-from-another-branch

OTHER TIPS

merge again.

squash or no-squash both will work. no squash will create merge commit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top