Add option to preserve original author when cherry-picking via the UI
Problem
When cherry-picking a commit via the GitLab UI, the author is changed to the user performing the cherry-pick, and the original author is added as a Co-authored-by trailer. This behavior was introduced in GitLab 16.11 as part of the web commit signing feature (!148889 (merged)).
While this behavior makes sense for commit signing purposes, it can be problematic for workflows where preserving the original authorship is important, such as:
- Backporting fixes where credit should remain with the original author
- Compliance/audit requirements that track who originally wrote the code
- Maintaining accurate contribution statistics (e.g., for open source projects)
Currently, the only way to preserve the original author is to use the command line (git cherry-pick <sha>), which defeats the convenience of the UI workflow.
Proposal
Add an optional checkbox or toggle in the cherry-pick dialog that allows users to choose between:
-
Current behavior (default): The user performing the cherry-pick becomes the author, original author added as
Co-authored-bytrailer (supports commit signing) -
Preserve original author: Keep the original commit's author (traditional
git cherry-pickbehavior, commit would not be signed)
The UI could display a note explaining that preserving the original author means the commit cannot be signed by GitLab.