zoukankan      html  css  js  c++  java
  • Gitlab之版本回滚

      gitlab提交错误需要回滚版本

      首先查看log找到需要回滚的head

     git log
    

      回滚

    git reset --hard 297ff2dcf20605297684f296a4b4ccaa1cf4dc48
    

      强制提交

    git push -f origin master
    

      强制提交报错

    [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默认分支是保护状态取消分支保护即可提交

  • 相关阅读:
    nexus
    图片水印
    springmvc+mybatis+spring+redis
    web-fragment模块化使用
    jackson的使用
    httpClient
    ftp上传文件
    windows server 2008 R2中建立ftp站点
    保存网络中的文件
    读取excel文件
  • 原文地址:https://www.cnblogs.com/minseo/p/10640891.html
Copyright © 2011-2022 走看看