现在有这样的一种需求,服务器A上有一个repo,在服务器B上git clone
了这个repo,现在由于某些限制开发人员只能访问到服务器B上,所以想在服务器B上设置一个repo供开发人员clone,开发模式就变成
1 2 |
|
但不知道如何将服务器A的repo,服务器B上的repo,以及本地的代码库关联起来?
漂亮男人2017-04-28 09:08:19
Of course, directly on server B
git clone plus --bare
parameters
It’s okay if you don’t add
--bare
, but when you clone from the server, there will be an extra layer of .git directory
Server B’s repo can be set up with post-receive git hooks
Let him actively push the code to server A after receiving the submission
1. Get the git repo of server A on server B
1 2 3 |
|
2. Get the git repo of server B locally
1 2 |
|