How can I clone git repository with specific revision, something like I usually do in Mercurial:

hg clone -r 3 /path/to/repository

18 s
18

$ 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 Reply

Your email address will not be published. Required fields are marked *