Doh! undo last commit (Magit edition)

from blog lmno.lol @alvaro, | ↗ original
I previously noted how to undo your last git commit (ie. soft reset). Using Magit: M-x magit-log-current. Move point to prior revision. M-x magit-reset-soft (defaults to revision at point). Or if you want a single function: (require 'magit) (defun ar/magit-soft-reset-head~1 () "Soft reset current git repo to HEAD~1." (interactive) ...