- Enabling commit edits from upstream members
- Pushing to the fork as the upstream member
Introduced in GitLab 10.6.
When a user opens a merge request from a fork, they are given the option to allow upstream members to collaborate with them on the source branch. This allows the members of the upstream project to make small fixes or rebase branches before merging, reducing the back and forth of accepting external contributions.
This feature is available for merge requests across forked projects that are publicly accessible.
When enabled for a merge request, members with merge access to the target branch of the project will be granted write permissions to the source branch of the merge request.
In GitLab 13.7 and later, this setting is enabled by default. It can be changed by users with Developer permissions to the source project. Once enabled, upstream members will also be able to retry the pipelines and jobs of the merge request:
While creating or editing a merge request, select the checkbox Allow commits from members who can merge to the target branch.
Once the merge request is created, you can see that commits from members who can merge to the target branch are allowed.
If the creator of the merge request has enabled contributions from upstream members, you can push directly to the branch of the forked repository.
- The forked project URL is
- The branch of the merge request is
Here’s how the process would look like:
First, you need to get the changes that the merge request has introduced. Click the Check out branch button that has some pre-populated commands that you can run.
Use the copy button to copy the first command and paste them in your terminal:
git fetch firstname.lastname@example.org:thedude/awesome-project.git update-docs git checkout -b thedude-awesome-project-update-docs FETCH_HEAD
This will fetch the branch of the forked project and then create a local branch based off the fetched branch.
- Make any changes you want and commit.
Push to the forked project:
git push email@example.com:thedude/awesome-project.git thedude-awesome-project-update-docs:update-docs
Note the colon (
:) between the two branches. The above command will push the local branch
update-docsbranch of the
When a user forks a project, the permissions on the forked copy are not copied over from the original project. The creator of the fork must grant permissions to the forked copy before members in the upstream project can view or merge the changes in the merge request.
To see the pipeline status from the merge request page of a forked project going back to the original project:
- Create a group containing all the upstream members.
- Go to the Members tab in the forked project and invite the newly-created group to the forked project.