How to generate human-readable description of git commit
The following command assumes that you have at least one previous tag in the repository:
git_describe.sh
git describe --long --tags --dirtyExample output:
git_describe_output.txt
v0.1.0-9-g68066f4-dirtyThis means that we’re on the 9th commit after the v0.1.0 tag with commit ID g68066f4 and the working tree is dirty, i.e. there are uncommited changes.
Check out similar posts by category:
Git, Version Management
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow