Borek Borek - 1 year ago 87
Git Question

How to use `git describe` on repos without tags?

For most of our repos, we use

git describe --tags
to print a version number like
. However, this fails if the repo doesn't have any tags yet.

Is there a flag of
git describe
or something similar that would work around this?

Answer Source

git-describe offers --always to give a fallback option. If you have any tags those are used, otherwise just the most recent commit id.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download