Please note there's also git reset --soft HEAD^
. It's similar to git reset
(which defaults to --mixed
) but it retains the index contents. So that if you've added/removed files, you have them in the index already.
Turns out to be very useful in case of giant commits.