14

Scenario: we are 3 developers.

Developer 1 (admin) created the main repo.

Developer 2 forked admin's repo.

Developer 3 forked admin's repo.

Developer 2 created a feature branch "Feature 1"

Developer 3 checked out "Feature 1" from developer 2 repo.

When Developer 3 tries to create a Merge Request he only sees his own and admin's repos.

So I wonder, Is it possible to create a Merge Request to another remote different than my fork's?"

The only work-around I have seen so far is:

Developer 2 pushes the feature branch to admin's repo (through a merge request) and asks the admin to "protect it", then Developer 3 would have to create a merge request to admin's repo as well, the problem with this approach is that Developer 2 loses the ownership of the branch and they will have to create merge requests every time they want to push their changes.

On the other hand, it seems like this feature was added to GitLab but I can't find the official documentation about this feature.

Guillermo Mansilla
  • 3,779
  • 2
  • 29
  • 34
  • I forgot to mention, I am using GitLab 7.8.1 – Guillermo Mansilla Mar 09 '15 at 19:50
  • What are you using for requesting merge requests? Technically if you checkout the same feature branch (Feature 1) then you will only see that branch on remote + admin's repo. All you have to do is push your changes to that feature branch or request merge depending what system you're using for it. At this point the creator of Feature 1 branch and you are both referencing the same branch on remote. – dchayka Apr 30 '16 at 15:45
  • The problem is you can only create a push request to the origin you created your branch from. What I want is the ability to create a pull request to another remote (pretty much what you do on github) – Guillermo Mansilla May 01 '16 at 17:06

2 Answers2

2

No forks, maybe?

You may utilise the fact, that merge requests can be made within the same repository. So maybe all three may use the same repository as developers, the admin should set the crucial branches as protected.

If any change is made, anyone can create a merge request from one branch to another... and anyone can review, discuss, ...

petrpulc
  • 940
  • 6
  • 22
0

Create a new group which has access to dev #2's fork. Add dev #3 to this group.

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820