Squash settings per protected branch
## Scenarios of where this feature would be useful From https://gitlab.com/gitlab-org/gitlab/-/issues/290042#note_1839756355 >>> One scenario that a per-target-branch setting does **not** support, is needing to merge back from `main`/`prod` (or `staging`) to `develop`. I'm no expert on GitFlow, but if I remember correctly, to do a hotfix you branch from `main`/`prod` to a hotfix branch, you prepare the fix there, then you merge the fix back to `main`/`prod` (potentially via `staging` in your example), and then you merge to `develop` (either merging the hotfix branch, or the `staging` branch, or `main`/`prod` - it doesn't make much difference). You don't want that merge, of the hotfix, be _squashed_ into `develop`, because if it is, you are setting yourself up for spurious merge conflicts, as the same hotfix change will later try to merge from `develop` back to `main`/`prod` (the squash to `develop` hides the fact that this hotfix change is _already_ in `main`/`prod`). >>> From https://gitlab.com/gitlab-org/gitlab/-/issues/290042#note_1871937616 >>> * `feature-*` =\> `main` - require squash and merge * `main` =\> `stable` - forbid squash and merge * `hotfix-*` =\> `stable` - require squash and merge >>>
epic