Cherry pick commits from fork to parent
Problem
Currently if a user wants to cherry pick a single commit from a fork, they would have to download the .patch
-file for it and do it manually.
Proposal
- Given I am a member of the parent project
- And I am looking at a commit in a downstream fork
- When I click the "options" button in the commit
- Then I will be able to select which project/branch I want to pick into
- And I will be able to either pick into the parent OR this fork (given I have access to do so)
This MVC will include only picking from a downstream fork into an upstream parent, one-way only. MVC assumes the user cherry-picking the commit is a member of the source project.
Links / references
- &1421 (closed)
- &264
- MR !56121 (merged)
- Docs MR !56311 (merged)
Customers
Release Notes
Description: Forking a git repository is a great way to collaborate on public projects where community contributors don't have write access to the parent project. Members of the parent project likewise benefit from community contributions. However, when a fork goes stale or the fork owner cannot be reached, members of the parent project who want to benefit from fork contributions by are left to manually download the fork's .patch
file to manually cherry-pick commits or otherwise copy/paste the contribution from the fork.
GitLab 13.11 introduces a new cherry-pick option which allows commits from forked repos to be cherry-picked directly into the parent repo by members of the parent project. A new pick into project
section has been added to the cherry-pick dialog, shown when selecting options>>Cherry-pick
in the commit details page.
Future enhancements include the ability to cherry-pick commits across the fork network.
Documentation: https://docs.gitlab.com/ee/user/project/merge_requests/cherry_pick_changes.html#cherry-pick-into-a-project