Creating pull requests in gitlab
Asked Answered
V

4

41

I have a GitLab installation running, and I have a repository that I want to share with my friends. I can't understand the flow of sending pull requests in GitLab.

A user can't fork my repository or access my project (unless he is my on team). A merge request can be from one branch to another in my repository.

How do pull requests work in GitLab?

Vacuum answered 13/3, 2013 at 21:23 Comment(0)
C
19

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

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

Chickpea answered 3/5, 2013 at 19:44 Comment(3)
Sounds great. +1 I have included that reference in my answer.Phaidra
I saw that.. this feature made my day :)Vacuum
GitLab now has forking and everything it entails (sending merge requests to the original, etc.)Flashing
F
39

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).

Flashing answered 8/1, 2014 at 11:2 Comment(3)
Great news; More up-to-date than my own answer. +1Phaidra
What is the name of the branch that is created for the test merge? I'm trying to set up TeamCity to build merge requests.Squarrose
This doesn't answer the question at all. We all know you can fork a repo and create a merge request, but HOW?Paulino
C
19

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

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

Chickpea answered 3/5, 2013 at 19:44 Comment(3)
Sounds great. +1 I have included that reference in my answer.Phaidra
I saw that.. this feature made my day :)Vacuum
GitLab now has forking and everything it entails (sending merge requests to the original, etc.)Flashing
P
14

As mentioned in "Development" and in this thread

There is no forking in GitLab (at least until GitLab 5.2, May 2013 as mentioned by, 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 request where it can be reviewed by other people in the project (or whatever your workflow dictates), and accept the merge.

Accepting merge request has been implementing in Issue 618:

accept merge request

Phaidra answered 13/3, 2013 at 21:45 Comment(4)
Ok, and what should I do If want to share my repository across many teams?Vacuum
@Yosy in the Admin section, you can define as many team as you want. In your project main page, you have a button "Assign project to team of users" which allows you to add a team assigned to that project.Phaidra
there is no option for public repositories like github?Vacuum
@github you can fork a GitHub repo on GitHub, but on GitLab, you cannot. You can clone locally a GitHub repo, and push it on a GitLab server, on which you have declared team to share it. But you will have to manually push back to GitHub any new commits done on GitLab that you want public.Phaidra
C
0

In gitlab "pull requests" are named "merge requests". Learn more about them here

For what I can see, you basically:

  • look for the merge request list option, inside your gitlab repo and click it
  • inside select create new merge request
  • select the source branch and the target branch
  • click continue and you are done
Chavis answered 18/5 at 16:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.