git - how to redo bad merge but keep some of my later commit? -


the history this:

a<───┬─ badmerg <── c  <── d b<───┘ 

now realized conflict resolution in merge bad. want redo merge again, keep commit c , d. how can this?

the easiest end riskless way comes mind is:

1 - create new branch named "backup" on commit d not checkout branch. stay on current one.

2 - hard reset current branch either commit or b (pick if want merge b a)

3 - merge b

4 - cherry pick c , d

5 - if good, delete backup branch.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -