git describe --always --dirty
Category: Git - Advanced
git describe --always --dirty
Describe commit appending -dirty if working tree modified
Like git describe but uses the commit hash if no tags exist, and appends '-dirty' if there are uncommitted changes.