Can I create a merge request, via command line, that would be the equivalent of a force push?
Yes, I want to rewrite history, in this case. I’m trying to replace the last merge with another one.
But the target branch is the master branch (in GitLab, if it matters), which is a protected branch. So, I can’t just issue force push to it, as I could do for other branches. I’m hoping a merge request could solve that(?).
Thanks.
Trying to run a force push command results in an error like this:
remote: GitLab: You are not allowed to force push code to a protected branch on this project.
To <repo URL>
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '<repo URL>'