Extract first commit to create new merge request
To simplify large MRs workflow we could offer an option to extract the first commit from the merge request to create a new merge request out of it. This should make a process of splitting a big MR into smaller ones a little bit easier.
The whole process could look like this:
- A big MR is created with more than 1 commit.
- Author decides to split the MR, goes to the Commits page and clicks on the first commit and executes 'Extract into new MR' action. (design TBD)
- A new smaller MR is created from this commit only (branch name decided during the process), target branch is re-used from the commit source MR.
- The original MR gets a new
HEAD
that doesn't have the extracted commit and also has the target branch set to the newly created MR working branch. It also receives the newly created MR as a blocker. - The process repeats for the remaining commits (target branches form a chain, new MRs add up to the main MR blockers).
- (optionally) When the extracted MR gets merged change the target branch for the original MR automatically.