现象

        本地使用 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 关闭保护。

 

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐