How to derive application build version string with Git's `describe` command?
问题 I want to compose application build version that is automatically derived from the Git branch name I am on (when building) and the number of commits since the branch has diverged. I believe this will be unique for any commit in my Git repository? Branch names are unique, and commits are linked to each other along a branch? If and when I tag a commit, I can also have the version be prefixed with that tag. In a way git describe does what I want, but it does not include the branch name I am on,