Skip to content

sources/|| file with invalid Windows filename breaks git checkout/clone on Windows #241

Description

@M11615

The repository contains a tracked file literally named sources/|| (a 0-byte blob). | is one of the characters forbidden in filenames on Windows (< > : " / \ | ? *), so any git clone or git checkout on native Windows (not WSL) fails while trying to materialize this file, e.g.:
error: invalid path 'sources/||'
This makes the repo impossible to clone normally on Windows.
Steps to reproduce

On Windows, run:

git clone https://github.com/vercel/geist-font.git

Checkout fails on the file sources/||.

Root cause
The file was introduced in this commit:
commit 30f2926
Author: Guido Ferreyra guido@tipografia.com.ar
Date: Tue Sep 10 12:33:47 2024 -0300

GF Compliance (includes breaking changes, new repo structure

It's a 0-byte file (blob e69de29b..., the empty blob), almost certainly an accidental artifact from a shell command like git add sources/.ext || true where the glob failed to expand and || got added as a literal filename.
Suggested fix
Simply remove the file, since it's empty and unused:
git rm 'sources/||'
git commit -m "Remove accidental empty file with invalid filename (breaks Windows clone)"
Workaround for other Windows users hitting this
Until fixed, Windows users can exclude the file via sparse-checkout:
git clone --no-checkout https://github.com/vercel/geist-font.git
cd geist-font
git sparse-checkout init --no-cone
echo "/
" > .git/info/sparse-checkout
echo "!/sources/||" >> .git/info/sparse-checkout
git checkout main

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions