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?
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?
Yes, that is possible with a Push Rule. in Settings > Repository for the repo, open the Protected Branches section, select your branch, and select "No one" for allowed to push.
Gitlab docs: https://docs.gitlab.com/ee/user/project/protected_branches.html
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/