I've just finished a git clone here on a new computer, and I now have the repo in an interesting state:
There is no branch checked out. The working directory is empty, but the repo is all here, compressed in the .git metadata.
Of course, the missing step here is to do a
Well, I believe I've found my own answer here. It is possible!
Git has the concept of 'orphan' branches. This is a branch that has no history relationship to any other commits on the repo history. This allows us to check out to 'no commit' by doing:
git checkout --orphan none
git rm -rf .
That effectively gets rid of all files, and because the 'none' branch has no ancestry, the deletions don't appear as removals. The metadata folder stays put, so to return to a valid branch, you just do another checkout.
More info here: https://coderwall.com/p/0n3soa/create-a-disconnected-git-branch
Gotta love git!