3

I am setting up the infrastructure for my project.

We have a remote GIT server at a different location. To avoid network delays we have set up local git server. Now what I intend to do is have my local git server talk to remote Git server so that both are in sync.

The idea is that whenever there is a commit/push in local Git server an automatic trigger must happen that should even push code to remote Git server and vice versa.

So finally at all time we have perfectly synced Git servers and now much faster too. I do not know how to achieve this, was wondering if something with hooks can be done, but I have no ideas.

pb2q
  • 58,613
  • 19
  • 146
  • 147
nishat
  • 947
  • 2
  • 8
  • 15

1 Answers1

1

As others pointed out in comments, git is pretty efficient about what it sends over the network. Unless you are versioning large binary files, pushing to a remote server over a slow internet connection won't be an issue. However, if you have a large repository the initial clone may take a long time. To improve that experience you could use a local mirror that people can clone from and then repoint origin at the main repository. There's more information here

Community
  • 1
  • 1
Roman
  • 19,581
  • 6
  • 68
  • 84