Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab: Is it possible to create a merge request from MY fork to Another fork of the same project

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.

like image 595
Guillermo Mansilla Avatar asked Mar 09 '15 19:03

Guillermo Mansilla


People also ask

How do you create a merge request from a fork?

You can create a merge request from your fork to contribute back to the main project. On the top bar, select Menu > Project. Select your fork of the repository. On the left menu, go to Merge requests, and select New merge request.

What is the request to merge forked changes called?

The name “pull request” comes from the idea that you're requesting the project to “pull” changes from your fork. You initiate a pull request when you're ready to begin merging new changes in the code to the project's main repository. You're informing the rest of the project team about your intentions.


1 Answers

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

like image 101
petrpulc Avatar answered Oct 22 '22 09:10

petrpulc