-2

Okay will explain ;) I have a repo say, sample.git (BARE) at place X and I have a cloned it to my production VM at location 'Y' (same sample.git as BARE only) and have setup a cron task to pull or fetch contents from X to Y @ regular intervals. (cron is working fine)

My concern is that , is it possible to alter the remote(origin) of the Y in such a way that , developers at Y should be able to pull or clone only from the repo @ Y , also Y should maintain its cron task of syncing data from X.

I hope I have put it down clearly !

Goku
  • 476
  • 1
  • 7
  • 15

1 Answers1

1

Yes, any clone of a git repository is itself a complete git repository. This is what allows for asynchronous work. This is also why any non-bare clone can be made bare.

In this case, as your clone (Y) is also bare, users can clone directly from it. I'm assuming that in your setup users will not be pushing back to Y, as this would then cause a conflict when your crontab pulls in changes from X. Thus, Y should be setup as a read-only repository for users that will be cloning from it, giving write access to the user under whom the crontab will be run.

Community
  • 1
  • 1
houtanb
  • 3,339
  • 16
  • 18