Push rules are essentially pre-receive Git hooks that are easy to enable in a user-friendly interface. They are defined globally if you are an admin or per project so you can have different rules applied to different projects depending on your needs. <sup>1</sup>
GitLab allows Administrators and Maintainers to restrict the kinds of files pushed to a repository. One way of enforcing push rules is via the: Project > Settings > Repository > Push Rules > Prohibited file names text field, where you can enter a concatenated regular expression (using the RE2 syntax).
This RE2 regular expression pattern is for testing GitLab Push Rules using GitLab's Project > Settings > Repository > Push Rules > Prohibited file names text field.
<a name="ref-gl-push-rules-docs"></a> [1]: Push Rules. (2019) | GitLab. Retrieved March 04, 2019, from https://docs.gitlab.com/ee/push_rules/push_rules.html