From 572d88a226e7cd9d98b4e6aa98713a4223b6e433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pasternak?= Date: Mon, 31 Dec 2018 11:58:10 +0100 Subject: [PATCH] Extra information about git hook Fixes #876 --- versioning.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/versioning.md b/versioning.md index a17ec1258..fa7d7cd5f 100644 --- a/versioning.md +++ b/versioning.md @@ -8,7 +8,19 @@ This page describes how to keep track of all changes to calendars and address books with **git** (or any other version control system). The repository must be initialized by running `git init` in the file -system folder. Internal files of Radicale can be excluded by creating the +system folder. Its default location can be: + +``` +# cd /var/lib/radicale/collections # in case of globally-installed Radicale +# git init +``` +or +``` +$ cd ~/.var/lib/radicale/collections # in case of user-installed Radicale +$ git init +``` + +Internal files of Radicale can be excluded by creating the file `.gitignore` with the following content: ``` .Radicale.cache @@ -16,6 +28,14 @@ file `.gitignore` with the following content: .Radicale.tmp-* ``` +Another git configuration issue, that must be performed is user.name and user.email +variables. You also need to do that only once per repository: + +``` +git config user.name "My Radicale User" +git config user.email "my_radicale_user@email.com" +``` + The configuration option `hook` in the `storage` section must be set to the following command: ```shell @@ -24,3 +44,7 @@ git add -A && (git diff --cached --quiet || git commit -m "Changes by "%(user)s) The command gets executed after every change to the storage and commits the changes into the **git** repository. + +In case of problems, make sure you run radicale with ``--debug`` switch and +inspect the log output. For more information, please visit +[section on logging.]({{ site.baseurl }}/logging/) .