Description:
We need to pull into a separate branch a few number of commits from another branch.
Solution:
GIT version control tool offers the solution: cherry picking.
Commit your changes to the branch, and tell GIT you want to use selected branch commits, by using the commit hash you can find in the log.
First, get the commit hash from the log:
$ git log -1
Then, cherry pick only the desired commit, and pull it into your branch:
$ git cherry-pick <commit hash>
That’s it, now the cherry picked commits will be merged into your branch, without having the whole other branch.