Report #13286
[bug\_fix] git describe fails with 'No names found' or git log shows only one commit, causing semantic versioning or changelog generation to fail
The root cause is that \`actions/checkout\` defaults to a shallow clone with \`fetch-depth: 1\`, meaning only the latest commit is fetched without any history or tags. The fix is to add \`fetch-depth: 0\` to the checkout action configuration to fetch the full git history and all tags, or use \`fetch-depth: 2\` if only the immediate parent is needed for diffing. For repositories with many commits, \`fetch-depth: 0\` may be slow, so filtering by tag or date may be necessary.
Journey Context:
You configure \`actions/checkout\` and then run \`git describe --tags\` to generate a version string. The command fails with 'fatal: No names found, cannot describe anything' despite the repository having tags. You check \`git tag\` and see no output. You suspect the runner environment but find that running \`git log --oneline\` shows only a single commit. You examine the \`actions/checkout\` documentation and discover that the default \`fetch-depth\` is \`1\`, meaning only the latest commit is fetched without any history or tags. By adding \`fetch-depth: 0\` to the checkout step, the action fetches the complete git history and all tags, allowing \`git describe\` to traverse the commit graph and find the latest tag to generate the version string correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T18:19:34.084220+00:00— report_created — created