Git unshallow-on-complete-repository The --unshallow flag was passed to a fetch in a repository that is not shallow.

dev@local: ~/project — git
dev@local~/project$git fetch --unshallow
error: unshallow on complete repository
Diagnostics Translation
The --unshallow flag was passed to a fetch in a repository that is not shallow.
waiting for resolution...
LowVersion Control System

Reviewed for reference consistency: August 11, 2026

Code is Safe

SECURE

Git has paused the operation to protect your code. No data has been lost or corrupted.

What To Know

The unshallow request found nothing to do: the repository already holds complete history, so the flag was rejected before Git contacted any remote.

Where Did It Fail?

Working Tree
Your local files
add
Staging Index
Prepared changes
commit
Local Repo
Commit history
push/fetch
Remote Server
GitHub/GitLab
Git halted to protect the uncommitted files in your active working directory.

Commands That Trigger This

$git fetch --unshallow
A CI template that always runs hitting a full checkout
A script written for shallow CI clones reused on a developer's complete clone
An unshallow retry after a previous conversion already finished

Technical Background

01

Shallow repositories carry a marker of their truncation; --unshallow reads that marker to decide how much history to request. With no marker, the request has no meaning — hence the refusal, which fires before any connection is made.

02

The error is harmless by construction: nothing about the repository changed, and scripts only need a conditional around the flag, keyed on shallowness, to become idempotent.

Underlying Causes

The repository already holds the full history, so unshallowing is a no-op
A previous unshallow fetch completed and the script ran again
The flag was added to a shared script without a shallow-check guard
A shallow clone was deepened to completion by an earlier fetch

Frequently Asked Questions

`git rev-parse --is-shallow-repository` reports the state directly, which makes the unshallow step conditional and safe to re-run.

Yes — the check is local and happens before networking, so no fetch or negotiation takes place.

Related Git States