Let's make a git repository out of whole cloth.
Git repos are stored in .git:
fakegit$ mkdir .git
They have a "symbolic ref" (which are text files, see man git-symbolic-ref
) named HEAD, pointing to the currently checked-out branch. Let's use master
. Branches are refs under refs/heads
(see man git-branch
):
fakegit ((unknown))$ echo 'ref: refs/heads/master' > .git/HEAD