Matched signals
- shallow update not allowed
- fatal: shallow file has changed since we read it
- git fetch --unshallow
- unshallow
- No names found, cannot describe anything
- fatal: No tags can describe
- You need to fetch more history
- does not contain any version tags
Git shallow clone missing history or tags
What this failure means
The CI job performed a shallow Git clone and a later step requires full commit history or tags. Tools like semantic-release, lerna, changelog generators, and tag-based version bumps fail because the expected refs are absent.
Symptoms
Faultline looks for one or more of these log fragments:
shallow update not allowed
fatal: shallow file has changed since we read it
git fetch --unshallow
unshallow
No names found, cannot describe anything
fatal: No tags can describe
You need to fetch more history
does not contain any version tags
Diagnosis
actions/checkout (and most CI checkout actions) default to fetch-depth: 1, which fetches only the most recent commit. Any step that needs to walk the commit graph, resolve a tag, or compute a version from git history will fail.
Common downstream failures:
git describereturns an error or a wrong result because no tags are reachable.semantic-release,standard-version, orlerna versioncannot determine the last release tag.- Changelog generation tools produce empty output because no prior commits are visible.
git logfrom the tool returns only a single commit.- A
git fetch --tagsorgit unshallowstep is missing in the workflow.
Fix steps
-
Set
fetch-depth: 0in theactions/checkoutstep to fetch the complete history and all tags:- uses: actions/checkout@v4 with: fetch-depth: 0 -
If you only need tags (not the full history), fetch tags explicitly after a shallow checkout:
git fetch --tags --force -
For self-hosted runners or other CI systems, replace the shallow boundary with a full fetch:
git fetch --unshallow -
If the workflow runs in a detached HEAD state, confirm the branch name is also available to the versioning tool:
git checkout -B "$BRANCH_NAME" HEAD
Validation
git log --oneline | wc -lreturns more than 1.git describe --tagsresolves without error.- The versioning tool produces the expected tag or version string.
Try it locally
git log --oneline | wc -l
git describe --tags
git describe --tags
git log --oneline | head -5
How Faultline detects it
Use faultline explain git-shallow-checkout to see the full playbook.
faultline analyze build.log
faultline explain git-shallow-checkout
Generated from playbooks/bundled/log/ci/git-shallow-checkout.yaml. Do not edit directly.