Is there any way we can control push operations in git branches?

Viewed 34

As maintainer, I want to temporarily block the git branch for push operation by all users having developer access.

Is there any way on GitLab that enables this feature?

2 Answers

It sounds to me that your workflow is a bit odd.
If a branch is regularly protected temporarily from pushing, it should always be a protected branch where changes come in via merge requests.

When you want no changes to this branch, you just don't accept any merge request for the time being.

Reference: https://docs.gitlab.com/ee/user/project/merge_requests/

Related