8

I am thinking about using git describe to generate automated version numbers. As suggest here.

My question is that if I get o/p of git describe as v2.0-64-g835c907, how can I checkout that particular revision number using git in future?

Community
  • 1
  • 1
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186

2 Answers2

7

You can just do

git checkout v2.0-64-g835c907

The output from git describe can be used as a reference to a commit itself

D-Rock
  • 2,636
  • 1
  • 21
  • 26
4

If I understand correctly this may be what you want:

git checkout `git describe`
iltempo
  • 15,718
  • 8
  • 61
  • 72