I’m experiencing a weird problem, which I think might be a bug.
I pushed a change in the configuration to the Git server. This included a new repository, so after pushing I logged on to the server to create and initialize the repo (as a copy of the main product repo teamer.git):
rwel@ve-git:/home/git/repositories/teamer$ sudo su git
git@ve-git:~/repositories/teamer$ git clone --bare ../teamer.git analytics.git
git@ve-git:~/repositories/teamer$ gitolite setup
The weird thing is, running “gitolite setup” appears to have reverted my changes! In the repository, a new commit has appeared with exactly the previous state of the configuration:

What has happened here and how can I fix it? If you need more info, please let me know.
Thanks!
Edit: I got some errors after pushing the new config, might have something to do with it:
gitolite-admin rwel$ git push origin
Counting objects: 11, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 1.07 KiB, done.
Total 7 (delta 2), reused 0 (delta 0)
remote: *** hooks.mailinglist is not set so no email will be sent
remote: *** for refs/heads/master update 85dd4c5e7592fadbdb0d445a245a8763d6e2042b->1063acec3b106b348fadac655d154a78ea15ead5
remote: FATAL: no files/dirs called 'hooks' or 'logs' are allowed
I think I found the problem. I had my (common) hooks placed in the root directory of the Gitolite admin repository (
[gitolite-admin.git]/hooks/common). Git does not like this, hence the error:Probably because of this, my Gitolite install got messed up, with the setup script appearantly trying to revert the failed commit.
The fix
First, I had to clean up the mess in the
gitolite-admin.gitrepo by cloning it on the server, resetting it toHEAD^and force-pushing that back to the repo (as explained here).To fix the fatal error, I simply moved the hooks to a subdirectory, as advised in the documentation (in a branch based on the reset
masterfrom step 1):To make this work, I also had to add a line to the
.gitolite.rcfile on the Git server:After pushing this, the fatal error was gone. I then proceeded to rebase my initial change on the fixed
master, and could now also push that with no problems.