Overview
Teaching: 10 min
Exercises: 0 minQuestions
- What are bare repositories?
- How can we create a common repository for a group on our local computer or server?
.git/
as well as a snapshot of your tracked files that you can directly edit called the working tree (the actual files you can edit)..git/
part, no files you can directly edit..git
to emphasize this.If we have enough time, the instructor demonstrates how to create a bare repository on the local computer:
git init
.--bare
or --mirror
:$ cd /path/to/example
$ git init
# now add some commits and branches ...
$ git clone --bare /path/to/example /path/to/example-bare
$ git clone /path/to/example-bare /path/to/example-clone
$ cd /path/to/example-clone
git remote -v
.origin
.Key Points
We do programming work inside non-bare repositories.
We can create a local common repository where we can push to and pull from.