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.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.