You are not allowed to force push code to a protected branch on this project 解决 GitLab:

2020-11-13 19:59:53

You are not allowed to force push code to a protected branch on this project 解决 GitLab:

我们--force上传git的时候,出现了这样的问题。

我们改怎么解决这个问题呢。

当我们有时候回滚了代码,想强制push到远程仓库的时候,

git push origin --force

会报如下错误:

You are not allowed to force push code to a protected branch on this project

如果用的是gitlab版本库,这说明gitlab对仓库启用了保护,需要在仓库中设置一下:

"Settings" -> "Repository" -> scroll down to "Protected branches".


  • 2018-07-10 16:56:42

    mysql in 排序 也可以按in里面的顺序来排序

    SQL: select * from table where id IN (3,6,9,1,2,5,8,7); 这样的情况取出来后,其实,id还是按1,2,3,4,5,6,7,8,9,排序的,但如果我们真要按IN里面的顺序排序怎么办?SQL能不能完成?是否需要取回来后再foreach一下?

  • 2018-08-02 15:03:28

    正则提取字段

    如下文案,如何提取中间的文案呢 eq: 我们的%%aaa%%不一致,哈哈哈 提取后是aaa

  • 2018-08-07 20:00:42

    xUtils3.0版本的发送同步网络请求的方式

    对于Android开发来说,基本都是用异步来从网络上请求数据,很少用到同步请求的。近日项目有个地方需要使用到同步请求(以我目前的知识储备来说好像只能用同步请求来解决这个问题了),去网上搜索相关资料,又没有找到什么明确的使用方法。所以记下来,以备不时之需。