I am the sole user of a GitLab repository and the I am the master. I had a few bad commits I would like to basically erase or over write. To do so I first git reset --hard AFewCommitsBack, I then edited my files as I saw fit. I am now trying to push my local branch to origin master though I caot do so because there is a remote ref that is not an ancestor of one I am pushing.
To solve this issue I tried to do a git push --force origin master though this failed with the message
remote: GitLab: You are not allowed to force push code to a protected branch on this project.
To 'git@...'
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@...'
How can I force this push to happen?
