Search code examples
gitdiffgit-mergepatchgit-diff

How do I synronize two git repos that are on different networks


I have a code base that is used on two different networks, A and B, that can no connectivity exists between A.git and B.git. The only way to talk between the networks is by burning a CD.

I have the git code base on both networks, but I am wondering how I can generate a patch to synchronize A.git and B.git. In other words

  • I start off with A.git and B.git being exactly the same
  • I work on my project on A.git
  • I want to get my changes that are on A.git over to B.git
  • What file/output could I produce on A.git and feed into B.git to make B.git exactly the same as A.git?

Please supply the commands needed to make this happen.


Solution

  • You can either:

    In both case, you would have to copy somehow only one file, which will then act as your remote repo (meaning, once copied over, you can pull from it)