iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
A shallow checkout can make a build lose the Git history or release tags its versioning tool needs, but it does not automatically explain why the result is specifically 0.1.0. That number may come from a configured fallback or project setting. Check both the checkout’s history and tags, then inspect the version tool’s configuration and build log.
How a shallow checkout affects version calculation
A shallow clone contains only a limited portion of a repository’s commit history. Git’s --depth option sets that limit and implies single-branch mode unless --no-single-branch is specified (Git clone documentation).
Some projects calculate a version from reachable Git tags and the number of commits since a release tag. If the checkout does not include the relevant tag, or lacks enough ancestry to reach it, the versioning tool may be unable to calculate the expected release-based version. What it emits instead depends on the project’s versioning tool and configuration.
Some CI services limit history and omit tags. PyScaffold’s version 4.3.1 FAQ notes: “Some CI services use shallow git clones, i.e. –depth N, or don’t download git tags to save bandwidth.” Its example concerns an unknown version or 0.0.post0.dev50; it does not establish why another project reports 0.1.0 (PyScaffold FAQ).
#1 Best Overall
Find out where 0.1.0 comes from
- Identify the versioning mechanism. Check the build configuration, packaging files, scripts, and logs to find whether the version is read from a project setting or generated from Git metadata.
- Check whether the checkout is shallow. Run
git rev-parse --is-shallow-repositoryin the build checkout. A result oftruemeans the repository is shallow. - Check available tags and ancestry. For a setuptools-scm project, PyScaffold recommends
git describe --dirty --tags --long --first-parentas a diagnostic. If the expected release tag is absent, the command cannot describe the checkout from that tag. - Inspect the fallback and build output. Look for an explicit version, fallback version, or default in the project’s versioning configuration. A shallow checkout is a plausible cause of a changed version, not proof that Git selected
0.1.0.
Restore the Git metadata the project needs
Tags and commit ancestry are separate requirements. Fetching tags can solve the problem when the relevant commit history is already available. If ancestry is missing, deepen the checkout or use a complete clone as well. Git’s fetch documentation warns that tags for commits brought in by deepening are not fetched automatically, so verify both the history and the tags (Git fetch documentation).
- When history is sufficient but tags are missing: fetch the repository’s tags, for example with
git fetch origin --tags, then rerun the project’s version diagnostic. - When the needed ancestry is missing: deepen the fetch or, if the remote repository is complete, run
git fetch --unshallow. Confirm that the release tag and intervening commits are available afterward. - When a full checkout is appropriate: configure the CI provider to fetch full history, then verify the resulting checkout rather than assuming a setting changed it.
AWS CodeBuild
AWS CodeBuild documents a Git clone-depth setting that includes a Full option for a full clone. If the project uses CodeBuild, inspect that setting and confirm whether tags are also present in the build checkout (AWS CodeBuild source documentation). Other providers have their own checkout controls.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Why the exact 0.1.0 value is project-specific
Missing tags or history can prevent a tool from deriving its intended version, but the replacement value comes from the tool and project configuration. Check for an explicit project version and any fallback setting before attributing 0.1.0 to the shallow checkout alone.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
One example of a different failure mode appears in Essentia’s setup script: it uses git describe --always --tags and notes that a shallow checkout with no reachable tags can produce a bare SHA rather than the expected tag-and-commit form. The script checks for the expected commit-count component before using it. That illustrates why build scripts may need to validate Git-derived output; it does not show that the unnamed project uses the same script or logic (Essentia setup script).
Quick Recap
Best Value
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

