From https://git-scm.com/docs/gitnamespaces:
Git supports dividing the refs of a single repository into multiple namespaces, each of which has its own branches, tags, and HEAD. Git can expose each namespace as an independent repository to pull from and push to, while sharing the object store, and exposing all the refs to operations such as git-gc.
I would like to make use of this feature by storing separate, unrelated repositories under a single unified repository. For example, I would like to host a single repository containing small Python libraries for my team, with each library having its own set branches/tags. I think I'm able to push branches from the individual repositories into the unified repository with something like git --namespace=library_n push --all unified_repo. That appears to work fine for the most part. What I'm missing from here is that there is no assigned HEAD in the new namespace. So, if I then run something like git --namespace=library_n clone unified_repo.git local_library_n, I get:
warning: remote HEAD refers to nonexistent ref, unable to checkout.
While the new clone functions just fine, it's annoying that there is no default HEAD that is checked out immediately after cloning. Am I approaching this incorrectly? Is there a proper way to clone/push to the the unified repo so that each namespace contains a proper HEAD?