There are many similar topics (many of them very old) but I am still lost. I have two servers, one has gitolite setup, and another has redmine setup. User is pushing changes to the repository created on gitolite server. Redmine is a user on this gitolite server and is pulling changes from it and showing them in browser.
More precisely, I have used the following line on redmine server:
git clone --mirror ssh://gitolite3@gitoliteserver/testing
Then, I configured this repository (testing.git) as a known repository to redmine - redmine can use bare and local repositories, only.
When user push changes to gitolite server, redmine does not automatically show them. I have to do the following on redmine server:
cd testing.git
git remote update
I could use cron on redmine server for regular updating repository testing.git. But many says this is inefficient and propose hooks. However, information are very confusing. Can you help me by answering if cron is a viable solution and if "git remote update" is a correct command for this cron? Or give me a clean example how to use hooks for my problem.
Not directly connected to the question, but I have to say. For me, non-native english, words as miror, mirrored, mirroring, etc. are hard to follow, please use alice and bob and such more easy terms. Even the word remote is confusing, if I am on A then B is remote for me, but if I am on B then A is remote for me. Thus, it is hard to read about git on the net, and the things are further complicated by the facts, that some solutions are github or bitbucket only variants.