Bare repositories in git
Lets learn to create bare repositories .
Bare repositories (without working directories) are typically needed for sharing.
Step1:Creating a bare repository.
cd .. git clone --bare hello hello.git ls hello.git
NOTE: We are now in the working directory.
$ git clone --bare hello hello.git Cloning into bare repository hello.git... done. $ ls hello.git HEAD config description hooks info objects packed-refs refs
Typically repositories ending in ‘.git’ are bare. As you can see there is no working directory in the hello.git repository. Actually it is nothing but the .git directory of a non-bare repository.