GIT checking out code from output of "git describe"

1.3k Views Asked by At

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?

2

There are 2 best solutions below

0
iltempo On BEST ANSWER

If I understand correctly this may be what you want:

git checkout `git describe`
0
D-Rock On

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