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
Post a Comment