I am using GitLab.
When I pushed up to prod last time, I later realized that there are many bugs.
So, I git reset --hard kjh35kh3kh4k2h4k2h4....
to the earlier working commit.
But now when I am trying to push it up to GitLab I am getting error master -> master (non-fast-forward)
because hint:
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
I tried to git push -f origin master
, but than I get a different error GitLab: You are not allowed to force push code to a protected branch on this project.
I do understand why it is happening, but how do I fix this cleanly?
Should I git reset --hard kjh35kh3kh4k2h4k2h4....
on GitLab as well, if so how do I do that?