Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra information about git hook #914

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,34 @@ 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
.Radicale.lock
.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 "[email protected]"
```

The configuration option `hook` in the `storage` section must be set to
the following command:
```shell
Expand All @@ -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/) .