46. Bare repos
- To learn to create bare repos.
Bare repos (without working directories) are typically needed for sharing.
01Creating 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.