I'm essentially seeking for a way to manage write permissions to specific branches.
This can be either before committing (local), or after committing but before pushing (remote).
I need to protect certain branches from being written to in order to enforce a workflow where the release branch can only be edited by some.