ive seen people pull that bone headed move on unix servers many times over the last 20 years.I find the best way to learn is to push your limits to force failure, because it is only then that you stand taller and rise higher, but if one already knew of commit confirm then locking oneself out is impossible really.
I knew a guy 20 years or so back who used to work at Xerox, he managed to "rm -rf /" on classic unix... god knows how someone can even make that mistake. Needless to say he wasn't employed long after that. A commit-confirm may have saved him his career LOL