8

I've used Mercurial for some time now, and am used to its workflow. Suddenly, I need to work with a Git repository, and I cannot make the install work from the head revision. In Mercurial I would just update to an earlier revision and go, but I don't see how to do that in Git.

So, how do I revert to an earlier state in a Git repository?

dimo414
  • 706
  • 7
  • 25

1 Answers1

8
git checkout <older revision key>

The first little bit of the hash works as a revision key, provided that it only matches that revision.

Ignacio Vazquez-Abrams
  • 111,361
  • 10
  • 201
  • 247