I want to have git repos accessable in redmine. But what about auto update of redmine git repos. I thought redmine will 'read' git repos but it wants to have its own local copy. So then the question of having the latest repo in redmine arises.
I found few solutions using cron but I would prefer to use git hook if possible. Any idea how to make git if there is repository update to also update redmine repository?
redmine wiki provides this solution but I do not understand what it does. Maybe it is what I want? Could somebody explain below code?
echo "Post receive-hook => updating Redmine repository"
sudo -u my_redmine_user -p secret perl -we '`cd /redmine/repositories/my_repo.git && git fetch && git reset --soft refs/remotes/origin/master`'