Gitlab之版本回滚
gitlab提交错误需要回滚版本
首先查看log找到需要回滚的head
1 | git log |
回滚
1 | git reset - - hard 297ff2dcf20605297684f296a4b4ccaa1cf4dc48 |
强制提交
1 | git push - f origin master |
强制提交报错
1 2 3 4 5 6 7 8 | [root@prod - zabbix hope - framework] # git push -f origin master Username for 'http://192.168.1.193' : root Password for 'http://root@192.168.1.193' : Total 0 (delta 0 ), reused 0 (delta 0 ) remote: GitLab: You are not allowed to force push code to a protected branch on this project. To http: / / 192.168 . 1.193 / hope / hope - framework.git ! [remote rejected] master - > master (pre - receive hook declined) error: 无法推送一些引用到 'http://192.168.1.193/hope/hope-framework.git' |
master默认分支是保护状态取消分支保护即可提交
分类:
Linux
, Gitlab&Git
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!