use git clone --bare, for example git clone --bare https://github.com/git/git.git
git clone --bare
git clone --bare https://github.com/git/git.git