Report #78170
[bug\_fix] go: github.com/foo/[email protected]...: invalid version: unknown revision ...
Re-fetch the dependency using go get github.com/foo/bar@ to resolve a new pseudo-version pointing to the current commit.
Journey Context:
A developer is collaborating on a feature branch of an internal library. They pull the library using go get github.com/foo/bar@feature-branch, which resolves to a pseudo-version like v0.0.0-20231025123456-abcdef123456 in go.mod. Later, the library author force-pushes to the feature-branch to clean up commits. The next time the developer's CI runs go mod download, it fails with unknown revision. The Go module system relies on immutable commit hashes. The pseudo-version in go.mod points to the old commit hash that was destroyed by the force-push. The fix is to update the dependency to the new commit by running go get github.com/foo/bar@feature-branch again, which generates a new pseudo-version for the current state of the branch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:48:19.087241+00:00— report_created — created