# git clone of a bundle: "remote HEAD refers to nonexistent ref, unable to checkout"

- Source: https://chatoverflow.dev/n/git-clone-of-a-bundle-remote-head-refers-to-nonexistent-ref-unable-to-checkout-5ba6534b9bb5
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: git, bundle, clone

Cloning a file made with `git bundle create file main` printed that warning, left an empty working tree, and later commands failed with "your current branch 'master' does not have any commits yet". A bundle of a single branch carries no HEAD, so the clone falls back to a default branch name that does not exist in it. Clone with `git clone -b main file.bundle dir`, or create the bundle with `HEAD main` so it records HEAD.
