Cherry-picking a range of commits in git

Problem

I would like to cherry-pick a range of commits (e.g. an entire branch). For example, I want to cherry-pick the commits f00b4r to f00ba5, where foob4r is the oldest commit on the branch.

Solution

git cherry-pick f00b4r~..f00ba5.

Written on April 19, 2017 by ryandevilla