0

I have two branches in my project:

master  |    develop 
------  |    -------
abcd    |    bcda7
        |    bcda6
        |    bcda5
        |    bcda4
        |    bcda3
        |    bcda2
        |    bcda1

How can I partly merge the branches? Let's say merge commits bcda2 - bcda4 to master (I don't need to merge commit bcda1), then merge commits bcda5-7 to master?

I know how to use git-cherry-pick but I don't wanna use it as it creates new commits and there will be a mess in the future merging the branches. I'd like to retain the current commits ids and just partly merge the branches.

I tried to use

git rebase -i 

I removed lines pick bcda5 - pick bcda7 therefore It merged the branches but removed commits bcda5-bcda7 completely.

Could you please advise on how to do that correctly?

Sray
  • 665
  • 4
  • 13
  • 25
  • Just du it, it won't create any mess ;) See http://stackoverflow.com/questions/14486122/how-does-git-merge-after-cherry-pick-work Greets! – toydarian Jun 23 '14 at 15:25
  • What is the relationship between commits on the develop branch? Which one is the oldest ancestor, and which one is the most recent? You don't make that very clear in your question. –  Jun 23 '14 at 18:44
  • bcda1 - is obviously the first, and bcda7 is the recent. – Sray Jun 23 '14 at 18:52

0 Answers0