现象
本地使用 git push --force origin 命令强制推送时,出现
“You are not allowed to force push code to a protected branch on this project”错误,意为该分支为受保护的,不允许这类操作,可以通过git管理后台关闭该项目分支的保护状态处理。
设置
使用管理员账号进入git中的项目设计,setting> repository>protected branches > unprotect 关闭保护。
文章来源:https://www.toymoban.com/news/detail-516304.html
文章来源地址https://www.toymoban.com/news/detail-516304.html
到了这里,关于git push错误:You are not allowed to force push code to a protected branch on this project的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!