git undo-commit-hard-clean

Undo a commit with a hard reset and a clean

Git alias:

undo-commit-hard-clean = !git reset --hard HEAD~1 && git clean -df

Example:

git undo-commit-hard-clean

See how to use this alias and related ones: