Optional CodeOwners: What does "approval required if pushing directly to protected branch" mean?

We are setting up CODEOWNERS for our repo, and I’d like some clarification on this part of the docs:

Optional sections in the CODEOWNERS file are treated as optional only when changes are submitted by using merge requests. If a change is submitted directly to the protected branch, approval from Code Owners is still required, even if the section is marked as optional.

The “merge request” part of this blurb makes sense to me: You don’t need optional CODEOWNERs to approve the MR.

But the second sentence confuses me. What does it mean to “Submit a change directly to the protected branch”? If CODEOWNER approval is required, how is that approval granted?

If I try to git push to a protected branch, I’d expect it to be accepted or rejected. But there’s no UI the pops up from the command line asking me to first get a CODEOWNER to approve it first.

Versions

Please select whether options apply, and add the version information.

Versions

  • GitLab Enterprise Edition [v16.9.2-ee]