How to clone git repository with specific revision/changeset?

$ git clone $URL
$ cd $PROJECT_NAME
$ git reset --hard $SHA1

To again go back to the most recent commit

$ git pull

To save online (remote) the reverted commit, you must to push enforcing origin:

git push origin -f

Leave a Comment