From theserverside.com
Creating a bare repo
There are two ways to create a bare Git repo:
- Clone an existing repository with the
git clone --bareswitch. - Create a new bare git repo with the
git init --bareswitch. Obviously, you should use the bare git init approach when you are starting a brand new project. And use the clone when a Git repo is active and you want to create a backup or extra node point.