How to combine fixes up to a point

I have 2 main master scenes, suggesting that I have 10 commits in the master class after I merged to organize some time ago. Now I would like to merge only the first 5 out of 10 commits into an intermediate branch. How to specify that in git.

+3
source share
1 answer

first look at the commit history and get the commit you want to merge from the main branch, you should see something like this:

$> git log
[...]
commit c5960dbe4674ae72f80cbe1ed5eb0cc690062c7a
Author: (...)
Date:   Mon Nov 18 11:42:58 2013 +0100

this is a commit message!
[...]

now switch to your intermediate branch and run

$> git merge <commit-id>

If you haven’t done anything strange, git should be able to speed up fast forward and you're done.

+1
source

All Articles