If the two servers aren't always available (in particular not available at the same time), then you need an external third-party source for your synchronization.
One solution for git repo is to use git bundle
which allows to create a kind of "bare repo" in one file.
Having only one file to move around make it any sync operation easier to do.
You will have to copy a bundle from one server to another (by whatever mean you want), in order for the second repo (on the second server) to pull from (you can pull from a git bundle: it acts as a bare repo) that bundle.