git报错You are not allowed to force push code to a protected branch on this project
当我们有时候回滚了代码,想强制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".
git报错You are not allowed to force push code to a protected branch on this project的更多相关文章
- git报错_you are not allowed to push code to protected branches on this project
问题描述 今天在提交代码的时候,由于使用的是新库,写完代码后,进行push,发现报错 you are not allowed to push code to protected branches on ...
- 报错:1130-host ... is not allowed to connect to this MySql server
报错:1130-host ... is not allowed to connect to this MySql server 解决方法: 1. 改表法. 可能是你的帐号不允许从远程登陆,只能在l ...
- Updates were rejected because the remote contains work that you do(git报错解决方案)
Updates were rejected because the remote contains work that you do(git报错解决方案) 今天向GitHub远程仓库提交本地项目文件时 ...
- git报错:'fatal:remote origin already exists
git报错:'fatal:remote origin already exists'怎么处理?附上git常用操作以及说明. git添加远程库的时候有可能出现如下的错误, 怎么解决? 只要两步: 1 ...
- Git报错 bad numeric config value '100000' for 'pack.windowmemory': out of range
Git报错 bad numeric config value '10240M' for 'pack.windowmemory': out of range $ git config --edit -- ...
- 记Git报错-refusing to merge unrelated histories
记Git报错-refusing to merge unrelated histories 系统:win7 git版本: 2.16.2.windows.1 问题 1.本地初始化了git仓库,放了一些 ...
- linux git 报错提示 fatal: 'origin' does not appear to be a git repository 解决办法
输入: git pull origin master git报错提示 fatal: 'origin' does not appear to be a git repository fatal: Cou ...
- Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).
Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). Git fet ...
- 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).
Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 2017年02 ...
随机推荐
- BZOJ5101 : [POI2018]Powód
求出Kruskal重构树,那么重构树上每个点的取值范围是定的. 考虑树形DP,则对于一个点,要么所有点水位相同,要么还未发生合并. 故$dp[x]=up[x]-down[x]+1+dp[l[x]]\t ...
- [POJ2287][Tyvj1048]田忌赛马 (贪心+DP)
瞎扯 很经典的一道题 考前才打 我太菜了QAQ 就是先贪心排序了好 然后在DP 这样比直接DP更容易理解 (其实这题做法还有很多) 代码 #include<cstdio> #include ...
- [P3957][NOIP2017]跳房子 (DP+二分/队列?)
看到GREED_VI大佬在打这题 我这个蒟蒻偷偷看一眼洛谷上目前普及难度里最难的一题 题目还是能看懂的,不想道路游戏那题,我完全不知道题目是什么意思…… GREED_VI大佬第一次用的是二分的思想,于 ...
- NOIP不开心记(不开心的东西肯定不能给别人看!)
写在前面的.. noip之后一直很想写一下什么的.. 老师:这就是你逃晚自习来机房的原因?? Day 0 坐了好久的车来到GZ.. 年年都是GZ.. sb酒店垃圾的要死.. 路上都是杀马特.. 隔壁还 ...
- JavaScirpt对象原生方法
Object.assign() Object.assign()方法用于合并对象,只会合并可枚举的属性 const obj1= {a: 1} const obj2 = Object.assign({}, ...
- pygame-KidsCanCode系列jumpy-part10-角色动画(上)
上一节学习如何利用spritesheet加载图片,但是player仍然是一张静态的图片,比较枯燥,我们要让它动起来! Player类,先把各种状态的图片加载起来: # 加载各种状态的图片序列 def ...
- 获取gcc和clang的内置宏定义
下面是对Gcc的内置宏定义的解释: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html https://github.co ...
- MAC终端密钥登录自动输入密码
升级MAC系统后,发现用于MAC终端ssh服务器的登录脚本无法正常执行了,表现为:需要手动输入密钥密码,于是重新整理一下,恢复正常,在此记录一下: #!/usr/bin/expect -fspawn ...
- 通过Pdf预览Excel或者word或者Powerpoint (C#将Office转换为PDF)
下面代码是Excel转换为PDF using System; using System.Collections.Generic; using System.Linq; using System.Web ...
- 使用http load测试qps
官网 http://acme.com/software/http_load/ 安装 wget http://acme.com/software/http_load/http_load-12mar200 ...