I am doing merge bunches of commits using cherry-pick
git rev-list --reverse something-begin..something-end | git cherry-pick --stdin
Finally I found the solution.
git rev-list --reverse something-begin..something-end . | git cherry-pick --stdin
Adding a dot to rev-list
command (that is the path parts) will skip all empty commits for me (what is --remove-empty
for??)
You can use rebase in this way (having your target branch checked out):
git reset --hard something-end && git rebase ORIG_HEAD
which automatically skips redundant commits.
Credits go to my colleague Michael Adam, who came up with that idea.