In a gitolite setup, is there a way to allow some commits to bypass some restrictions?
More specifically, I want to deny some actions (like creating a branch) to prevent doing so by accident, these restrictions are done in gitolite.conf file and I know how to do so, but additionally I want users to be able to bypass some of these restrictions if they are really sure (e.g. by including –force in commit message).
Is this possible trough gitolite configuration itself or a plugin? If not, how can I modify gitolite hooks to enable such feature?
For any custom-designed restriction you might want to enforce, you could consider using, especially with gitoliteV3, the VREFS or “Virtual References.
Those are script which can allow or deny a git command based on a variety of criteria, including commit message (as I recently illustrated in “git gitolite (v3)
pre-receivehook for all commit messages“).