git reset How to reset and deal with screw ups

This lesson is available for PRO members or as a single course purchase. Sign-in and choose a plan below.
Get Unlimited PRO Access

OR


*Enrollment provides full access to this course (and updates) for life.

Unstage all staged files.

command line
git reset

Rollback to a previous commit, BUT keep your changes in the working directory.

command line
git reset <commit-ID>

Rollback to a previous commit AND discard all changes. Be careful with this one.

command line
git reset <commit-ID> --hard

Questions?

Ask questions via GitHub below OR chat on Slack #questions