我错误地将一些东西推入了远程仓库。 现在我想返回一个提交然后强制推送它,以更正它。
>>git reset HEAD~
>>git push -f
remote: GitLab: You are not allowed to force push code to a protected branch on this project.
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push
而不是取消 Gitlab 中的保护并尝试再次强制推送,似乎 风险很大,因为这是一个大项目。 我可以用来解决这个问题的另一种选择是什么? 谢谢