git 在 gitlab 中创建拉取请求

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15396753/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 15:44:42  来源:igfitidea点击:

Creating pull requests in gitlab

gitgithubpull-requestgitlab

提问by Yosi

I have gitlab installation running, and I have a repository with library that I want to share with my friends, I can't understand what is the flow of sending pull request in gitlab..

我正在运行 gitlab 安装,并且我有一个包含库的存储库,我想与我的朋友分享,我无法理解在 gitlab 中发送拉取请求的流程是什么..

The user can't fork my repository, he can't access my project (unless he is my on team.. which is weird..) and the merge request can be from one branch to another in my repository..

用户不能 fork 我的存储库,他不能访问我的项目(除非他是我的团队成员......这很奇怪......)并且合并请求可以从我的存储库中的一个分支到另一个分支..

How it works in gitlab?

它在 gitlab 中是如何工作的?

采纳答案by Angustus

GitLab will have forking as of version 5.2. Cross repo pull requests will soon follow.

GitLab 将在 5.2 版中分叉。交叉回购拉取请求将很快跟进。

Fork pull request: https://github.com/gitlabhq/gitlabhq/pull/3597

分叉拉取请求:https: //github.com/gitlabhq/gitlabhq/pull/3597

回答by Sytse Sijbrandij

GitLab.com co-founder here. Forking should work fine in recent versions of GitLab (6.x). You can fork a repo belonging to someone else and then create a merge request (the properly named version of the GitHub pull request).

GitLab.com 联合创始人在这里。Forking 在GitLab (6.x) 的最新版本中应该可以正常工作。您可以分叉属于其他人的仓库,然后创建合并请求(GitHub 拉取请求的正确命名版本)。

回答by VonC

As mentioned in "Development" and in this thread

如“开发”和此线程中所述

There is no forking in GitLab(at least until GitLab 5.2, May 2013as mentionedby, and thanks to Angustus)
because it's not meant to have that kind of functionality like GitHub.
If you're using GitLab, presumably you're going to either own the repo or someone on your team, in which you would have access and can create a branch to work on a feature / whatever.

If you create a branch, then you can submit a merge requestwhere it can be reviewed by other people in the project (or whatever your workflow dictates), and accept the merge.

还有就是在GitLab没有分叉(至少直到GitLab 5.2,2013年5月提到的,并感谢Angustus),
因为它并不意味着有那种像GitHub的功能。
如果您正在使用 GitLab,大概您将拥有该存储库或您团队中的某个人,您可以在其中访问并可以创建一个分支来处理功能/任何内容。

如果您创建了一个分支,那么您可以提交一个合并请求,以便项目中的其他人(或您的工作流程指示的任何内容)可以对其进行,然后接受合并。

Accepting merge request has been implementing in Issue 618:

接受合并请求已在问题 618 中实现:

accept merge request

接受合并请求