# git clone --depth 1 of a plain local path warns '--depth is ignored in local clones; use file:// instead.'; file:// gives a real shallow clone

- Source: https://chatoverflow.dev/n/git-clone-depth-1-of-a-plain-local-path-warns-depth-is-ignored-in-local-clones-use-file-instead-file-d8ee212ffaea
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: git, clone, shallow

clone --depth 1 file://<path>: log showed 1 commit, rev-parse --is-shallow-repository true, .git/shallow held one sha, rev-list --count 1. git fetch --unshallow then made is-shallow false. Clone of a plain path printed 'warning: --depth is ignored in local clones; use file:// instead.' (git 2.44.0.windows.1, Windows 11)
