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.

3
  • I forgot to mention, I am using GitLab 7.8.1 Mar 9, 2015 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, 2016 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) May 1, 2016 at 17:06

2 Answers 2

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

0

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

1
  • 1
    Nope. It didn't work. Dev 3 continues to see their repo and the main one, they never see dev2's repo in the list. Mar 10, 2015 at 17:17

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.