Last Updated: February 25, 2016
·
551
· minton

Easy rollback w/o cleaning entire git repo

Want to roll back all changes including new, untracked files without cleaning your entire git repo? Easy...

git add .
git reset --hard

I have the following alias defined which allows me to do this by typing git reset.

[alias]
    reset = !git add . && git reset --hard && git status