Gitlab post-receive/update hook to forward a commit to another git repo

自闭症网瘾萝莉.ら 提交于 2019-12-05 05:08:36

问题


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:


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.



来源:https://stackoverflow.com/questions/27961419/gitlab-post-receive-update-hook-to-forward-a-commit-to-another-git-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!