1

I am setting up an environment for our team and our contractor team to develop a project.

Our team is sitting in network A. Our contractor team is sitting in network B. For security reason, Network A and B will be connected once a day (or a few days). Both networks cannot be connected to the Internet.

We decided to adopt GIT's integration manager workflow approach. We plan to setup our central repo in Network A. Then, setup a integration manager repo in network B.

Contractor team's developers will pushed their changes to integration manager repo. A system analyst in the contractor team will review and rebase the codes before pushing to Central repo and pulling the changes we made to central repo.

I would like to ask:

  1. Should integration manager repo be bare or not? I am confused after reading posts from the web. If it cannot be bare, then should I set receive.denycurrentbranch=refuse or updateInstead?

  2. Should the contractor's system analyst rebase codes in integration manager? If not, then what is the proper way to rebase the codes by the SA before pushing the changes to central repo?

Mad Physicist
  • 107,652
  • 25
  • 181
  • 264

1 Answers1

0

Should integration manager repo be bare or not?

It is better for any repo your are pushing to to be bare.
The integrator can then pull to his/her own integration repo (which is not bare), and have a look there. (while the network is closed again)

Once the integrator has done the integration job, he/she can push to a networkA bare repo acting as a referential, and colleague can pull --rebase from it.
A pull -rebase would help rebase any local (not yet pushed) commits on top of the updated remote branch. See also "Can “git pull” automatically stash and pop pending changes?".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks VonC. Consider my environment, should I create a clone (source from Network's A central repo) in network B solely for pulling changes and for contractor developers to pull changes (as they do not have access to central repo directly)? Then should I create another GIT server for developers to push changes to? Then the integration manager will pull the changes, rebase, and then push to Network A's central repo? – user5416972 Feb 06 '18 at 07:05
  • @user5416972 That is the general idea, yes: with git, you can create as many clone as you need. – VonC Feb 06 '18 at 07:08