Hacker News new | ask | show | jobs
by b5n 1242 days ago
If your fs already supports snapshots/versioning it might be convenient, but it doesn't solve the actual hard part which generally comes after changes have been merged upstream.

If we're only concerned with local changes I'd rather introduce beginners to `reset`, experts will already be doing something similar dependent on circumstance.

    git reset --hard

    git tag BEFORE
    git reset --hard BEFORE

    git reset --hard ORIG_HEAD

    git reflog
    git reset --hard HEAD@{<N>}