Gitolite repositories do not have working copies. So, you need to create other repositories with working copies, fix the data and click on managed gitolit. The easiest way to do this is on the server directly. Therefore, in every www do directory:
cd /home/X/www git init git remote add origin /home/gitolite/repositories/X.git git add . git commit git push origin
Now you have the data in the repositories, which was the easy part. I assume that the same user account has access to both gitolite repositories and server data (as you said in the chat), which greatly facilitates the problem.
There are no alternatives in the repositories now, so you have two copies of the data. To remove them, this is probably the easiest thing for every site:
cd /home/X git clone -s /home/gitolite/repositories/X.git www.new mv www www.old mv www.new www rm -r www.old
(the -s for cloning ensures that the repository /home/X/www/.git will not copy data from /home/gitolite/repositories/X.git ). And finally, you need to install the hook. This has already been explained in this question , but your situation is a bit simpler. Since the data lives on the same server and under the same user, you can simply set the hook after the update to all gitolite repositories containing only:
#!/bin/sh cd /home/X/www git pull
If you ever want to move the repositories and the web server to separate servers (which I would recommend, because the web server, if it is facing outward, should be in the "DMZ", and the git server is better on your internal network after another line of firewalls), of course, you will need the ssh trigger described in this other question.
source share