Gitlab post-receive/update hook to forward a commi

2019-04-02 02:00发布

In a team we have a gitlab set up that is avialable only to our team and is meant for development purposes, pushing, branching etc and we have an official git repo to which we would like to mirror commits only from master branch (stable).

I know that this can be done with use of server-side git hooks but how specifically can I do that so that the developers won't have to type anything extra and the hook will be set on gitlab (no on developers' machines - local repos) ?

1条回答
唯我独甜
2楼-- · 2019-04-02 02:42

Take a look at this recipe. In the recipe the author propagates changes being pushed to the master to a working tree, you need to replace that part of the code with another git push to your public server.

查看更多
登录 后发表回答