I have a question about git repository replication across several live http servers
My goal was to create replication from my test server to the live http servers. So when I'd commit my changes on test, the changes should automatically appear also on server I had a look at gerrit2 and it looks ok but I tried to do it with git, but since git uses post-commit hook I’m sure I’d be able to do it with that
So I tried doing multiple pushes in the hook after commit ( since overwriting seems to be only option because if I merged there’d a chance of conflicts and last thing I want to have on my live server are messed up files...) from test to live and firstly I got some odd errors, but then I added the force parameter and push succeeded but unfortunately the changes did not appear on remote server. I was using ssh protocol to exchange data.
How to do it so it will be good and reliable? What is the set of commands I must execute?
git reset --hard
on the other end afterwards.