Prevent squashing commits from protected branches
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
As part of a project with build promoted, we want to allow a merge of develop
to master
without squashing commits, so that the history git is identical between develop
and master
. However, we also want to allow squash commits between feature branches and develop
.
Proposal
Add a new setting in the Merge Request settings to prevent squashing commits from protected branches
. This would disable squash commits for all MRs where the source branch is protected.
This should also hide the squash?
checkbox in MRs and if Add squash settings support to protected branches (#498698 - closed) has been implemented, it should also prevent you from creating any overrides where the source branch is a protected branch.
Solution is part of Merge Request Squash Settings per protected bra... (#290042 - closed). Discussion about flexibility of proposed solution #290042 (comment 1838149523).