git undo-to-pristine

Undo commits and clean all differences

Git alias:

undo-to-pristine = !git reset --hard && git clean -dffx

Example:

git undo-to-pristine

See how to use this alias and related ones: