lab 46 Bare Repositories

Goals

Bare repositories (without working directories) are usually used for sharing.

NOTE: 46-49 are optional steps. Don't forget to cd out of the working directory
'hello' means your repository.

Create a bare repository. 01

Execute:

cd ..
git clone --bare hello hello.git
ls hello.git

Output:

$ 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

The convention is that repositories ending in ‘.git’ are bare repositories. We can see that there is no working directory in the hello.git repo. Essentially it is nothing but the .git directory of a non-bare repo.

Table of Contents