0

This question is related to the following questions:

Git: duplicate commits after local rebase, then pull

Git commits are duplicated in the same branch after doing a rebase

I created a new branch named seebuild out of my development branch. The mistake I made was that I rebased commits (A and B) in seebuild branch which were already pushed in develop branch. Now I end up duplicate commits in seebuild. When I now try to merge seebuild into develop, I get conflicts. The picture shows the scenarioenter image description here

Now I donot need to retain my seebuild and origin/seebuild and these branches can be deleted after merging them in develop branch. But I must merge commits C and D in develop branch and while doing so I want to exclude the duplicate commits A and B. How do I do this ?

Community
  • 1
  • 1
nurabha
  • 1,152
  • 3
  • 18
  • 42

1 Answers1

0

If you don't need the history of their branch you can cherry pick them in with git cherry-pick

Simon
  • 6,293
  • 2
  • 28
  • 34