简体   繁体   中英

Git - how to merge additional branch changes after branch has been 'merge --squash'ed

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!

如果我正确理解您的方法,那就是挑樱桃: https : //ariejan.net/2010/06/10/cherry-picking-specific-commits-from-another-branch

merge again.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM