A---B---C---D master
/
E---F---G---H feature
git rebase master feature
E---F---G---H feature
\
A'---B'---C'---D'
Note: A, B, C and D are no more
or
A---B---C---D master
/
E---F---G---H feature
git checkout master -b feature/new
git cherrypick A^..D
A---B---C---D master
/
E---F---G---H feature
\
A'---B'---C'---D' feature/new
Note: A, B, C and D are still there