GitCheatSheet.org logo
Home / How To

Reset the working directory to the state of a specific commit

git reset --hard abc123

Resets the working directory to the state of commit "abc123". WARNING: This deletes uncommitted changes and also deletes commits subsequent to "abc123".