Having 2 servers which should be in sync with eachothers at all times.
As someone pushes something to the repository of server A, the repository on server B should be updated automatically, depending what server is the master/slave.
Both servers are not on the same machine.
Is this possible without having to run additional manual commands every update? (git fetch etc.) Or do you advise a different mechanism?
You could use a post-receive
or update
Git Hook to push between repositories.
来源:https://stackoverflow.com/questions/17596503/how-to-keep-2-git-repositories-in-sync-automatically