bookmark

git checkout - How to revert Git repository to a previous commit? - Stack Overflow


Description

This will destroy any local modifications.

Don't do it if you have uncommitted work you want to keep.

git reset --hard 0d1d7fc32

Alternatively, if there's work to keep:

git stash git reset --hard 0d1d7fc32 git stash pop

Preview

Tags

Users

  • @jil

Comments and Reviews