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?

Seymour Guado
  • 246
  • 2
  • 13
Yosi
  • 2,936
  • 7
  • 39
  • 64

3 Answers3

38

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

Sytse Sijbrandij
  • 1,885
  • 2
  • 22
  • 20
18

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

Angustus
  • 306
  • 1
  • 3
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

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Ok, and what should I do If want to share my repository across many teams? – Yosi Mar 14 '13 at 05:57
  • @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. – VonC Mar 14 '13 at 06:26
  • there is no option for public repositories like github? – Yosi Mar 14 '13 at 17:59
  • 1
    @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. – VonC Mar 15 '13 at 06:10