How can I allow non-fast-foward commits on some branches but not others in a bare git repository?

21 Views Asked by At

I have a bare git repo as my remote. The master branch is protected from force pushes and other history changes with the following in the config file:

[receive]
        denyNonFastForwards = True

However, this prevents non-fast-forward updates to all branches. This means I can't use, e.g., a rebase-style workflow in a feature branch.

Is there any way in a bare git repo to deny non-fast-forward updates to the master branch but allow them for all other branches?

0

There are 0 best solutions below