Git Describe
Predict Output Medium
Question
What does this code print?
Code
git describe --tags
# v1.0.0-3-ga1b2c3
Hint
describe finds the nearest tag and counts commits.
Explanation
git describe --tags outputs the nearest tag, the number of commits since that tag, and the abbreviated hash. v1.0.0-3-ga1b2c3 means 3 commits after v1.0.0 at commit a1b2c3. This is useful for version strings in builds.
Related Resources
Related Lessons
- Git Commit
Learn git commit.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.