How to cherry-pick multiple commits

Git 1.7.2 introduced the ability to cherry pick a range of commits. From the release notes: git cherry-pick learned to pick a range of commits (e.g. cherry-pick A..B and cherry-pick –stdin), so did git revert; these do not support the nicer sequencing control rebase [-i] has, though. To cherry-pick all the commits from commit A … Read more

Undoing a git rebase

The easiest way would be to find the head commit of the branch as it was immediately before the rebase started in the reflog… git reflog and to reset the current branch to it (with the usual caveats about being absolutely sure before reseting with the –hard option). Suppose the old commit was HEAD@{2} in … Read more