Using git I made something like this
git clone git checkout {a rev number tree rev before} (here I started to be in a detached head state) //hacking git comm
Maybe not the best solution, (will rewrite history) but you could also do git reset --hard .
git reset --hard