## git repository setup
-When using Git, you probably want to set up two repositories, of which
-one should be bare (meaning that it does not have a working tree
-checked out), and the other one with a working tree will be used as
-ikiwiki's srcdir for compiling the wiki. [[ikiwiki-makerepo]] can automate
-setting this up. Using a pair of repositories isn't the most obvious set up,
-but it works the best for typical ikiwiki use.
-[[tips/Laptop_wiki_with_git]] describes a different way to set up ikiwiki
-and git.
+When using Git, you probably want to set up three repositories:
+
+* One of these repositories should be a bare repository (meaning that it does not have a working tree checked out), which the other two repositories will push to/pull from. It is a bare repository, since there are problems pushing to a repository that has a working directory. This is called _repository_ in [[ikiwiki-makerepo]]'s manual page. Nominally, this bare repository has a`post-commit` hook that would change directory to the second repository (the working directory for ikiwiki), do a _git pull_, and refresh ikiwiki to regenerate the wiki with any new content.
+* The second repository has a working tree which is used as ikiwiki's srcdir for compiling the wiki. **Never** push to this repository. When running as a [[cgi]], the changes are committed to this repository, and pushed to the master repository above. This is called _srcdir_ in [[ikiwiki-makerepo]]'smanual page.
+* The third (and fourth, fifth, sixth -- however many pleases you) repository is a clone of the bare master repository above -- and this has a working directory for you to work on. Use either the `git` transport (if available), or `ssh`. These repositories may be on remote machines, your laptop, whereever you find convenient to hack on your wiki. Any new content should be pushed to the bare master repository when you are ready to publish it, and then the post-commit hook of the bare repository will ensure that the ikiwiki's source directory is updated, and the ikiwiki refreshed with the new content.
+
+[[ikiwiki-makerepo]] can automate setting this up. Using three or more of repositories isn't the most obvious set up, but it works the best for typical ikiwiki use. [[tips/Laptop_wiki_with_git]] describes a different way to set up ikiwiki and git.
It is **paramount** that you **never** push to the non-bare repository
([this FAQ entry explains why](http://git.or.cz/gitwiki/GitFaq#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73)).
-Instead, if you want to work on the wiki from a remote machine, clone
-the bare repository, using either the `git` transport (if available), or
-`ssh`.
+Instead, clone the bare repository as mentioned above, and push **only** to the bare repository.
The ikiwiki `post-commit` hook should be put in the bare repository.