Search code examples
gitversion-controlgitlabgit-merge

Gitlab requesting I create a merge request instead of pushing straight into repo


I have setup a deploy/staging repo for a GitLab project, however, whenever I push into it (it has a DeployHQ webhook if that makes a difference?) it says the following:

remote:
remote: To create a merge request for deploy/staging, visit:
remote:   https://gitlab.com/USER/PROJECT/merge_requests/new?merge_request%5Bsource_branch%5D=deploy%2Fstaging
remote:

What are the differences I could look into for this branch and my user/feature/master branches that just say the expected push messages with data compression/object writing status etc

Thanks


Solution

  • The user is getting such messages while pushing when the branch is protected.

    See full details in GitLab Documentation - Protected Branches

    To disable the message uncheck Project settings > General > Merge Requests -> Option Show link to create/view merge request when pushing from the command line

    Merge request settings
    (source: gitlab.com)

    See full details in GitLab Documentation - Merge request settings

    I don't know DeployHQ but as far as I know a GitLab Webhook can only notify and not block a push. See full details in GitLab Documentation - Webhooks.