Reputation: 2763
I have the following branches in my Git repository:
I have merged the bugfix-abc branch into master but should have merged it into the release-1.0 branch. This is fine since master will eventually need these changes anyway. Master has also received several other commits which should not be in the release branch.
What is the preferred method of merging just the commits that were formerly made in bugfix-abc into release-1.0? Note that the bugfix-abc branch has been deleted. I do have a list of the individual commit IDs if that helps since there were only 3.
I've been reading about the difference between merging and cherry picking but still not quite sure which best applies best in this situation. Since the release-1.0 branch will eventually be merged back into master I want to be sure I cause as little conflict as possible at that time.
Thank you.
Upvotes: 0
Views: 94
Reputation: 24458
Since you have the commit IDs, you can recreate the branch using ID of the last commit:
git branch bugfix-abc 123abc
Then, you can merge it into master normally:
git checkout master
git merge bugfix-abc
Upvotes: 1