如何在Gitlab中更改合并的默认目标分支 [英] How to change the default target branch for merges in Gitlab

查看:4073
本文介绍了如何在Gitlab中更改合并的默认目标分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Gitlab 8.10.1以及许多组和项目。许多项目恰好是其他项目的分支。
我们的问题是,每当有人打开项目的合并请求时,默认目标分支不是项目的默认分支,而是来自一个非常特定的其他项目。有没有办法重写这个设置?
为了说清楚,我知道如何设置项目的默认分支,并且这些设置看起来是正确的,但是gitlab在创建合并请求时似乎没有使用它们。
这个问题非常令人讨厌,并且导致了人们不注意并以完全不同的主作为目标的合并请求时的奇怪情况。

we are using Gitlab 8.10.1 with many groups and projects. Many of the projects happen to be forks of other projects. Our problem is that whenever somebody opens a merge request for a project the default target branch is NOT the default branch of the project but from one very specific other project. Is there a way to override this setting somehow? Just to make it clear, I know how to set the default branch of a project and those settings appear to be correct, however gitlab doesn't seem to use them when creating merge requests. This issue is very annoying and has led to weird situations when people didn't pay attention and made merge requests with a completely different "master" as target.

推荐答案

我们发现这种行为的来源,这是由于项目之间的关系,因为一个项目在gitlab中与另一个项目分离。删除源和叉之间的关系时,默认的合并分支是项目本身的默认分支。
现在,这是我们针对这种情况的解决方案,因为我们可以接受删除源>>关系的影响。

We found the source for this behavior, it is due to the relationship between the projects as one project was forked in gitlab from the other. When removing the relation between the source and the fork, the default branch for merges is the default branch of the project itself. Right now this is our solution for this situation, as we can live with the implications of the removal of the source<->fork relation.

这篇关于如何在Gitlab中更改合并的默认目标分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆