Hello! Yesterday I submitted my first merge request to a KDE software! I forked the repo, applied the edits, committed them and pushed to my fork, and then from gitlab created a merge request. after a few hours, the author pushed something into the master, making my merge request 1 commit behind the master. On the merge request details page, I now get this error:

Merge blocked: the source branch must be rebased onto the target branch.  [rebase without pipeline]  [rebase]

If I try to click on [rebase], I get this red error:

Source branch is protected from force push

what should I do to make my merge request “mergeable” again?

  • Zamundaaa@discuss.tchncs.de
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Presumably, your merge request is about merging your fork master branch into the upstream master branch, right?

    In that case, you have two options:

    1. Go into the Gitlab settings of your fork, find the setting where branches are protected and disable the protection for your master branch
    2. (the recommended way, at least for future merge requests) always create a feature branch, never work on master in the first place. You can create a branch from what you have right now on the command line with git checkout -b featurename. Then push that branch and create a new merge request for it