解决pre-commit hook failed (add --no-verify to bypass)的问题

简介: 该文介绍了两种免去Git预提交钩子(pre-commit)的方法。一是直接进入项目.git/hooks目录,使用`rm -rf ./git/hooks/pre-commit`命令删除pre-commit文件。二是提交时添加`--no-verify`参数,如`git commit --no-verify -m"XXX"`,以跳过预提交检查。

一、 简单粗暴的方式

进入项目的.git文件夹下面hooks文件夹,手动删除pre-commit文件

运行命令:rm  -rf ./git/hooks/pre-commit  删除pre-commit文件

二、 根据提示在命令中添加--no-verify

  将git commit -m"XXX" 改为 git commit --no-verify –m"XXX"

目录
相关文章
|
9月前
|
数据库管理
SVN 执行cleanup报错:Cleanup failed to process the following paths : 解决方法
引用:https://www.cnblogs.com/pinpin/p/11395438.html 在SVN更新时提示文件被锁住了,要求执行 clean up操作,执行clean up时又报clean up failed。造成的原因是在某次更新后,点击了cancel按钮,操作没有完成所以会锁住。解决方法如下:
468 0
Flutter之运行提示Could not update files on device: Connection closed before full header was received
Flutter之运行提示Could not update files on device: Connection closed before full header was received
701 0
|
7月前
|
开发工具 git
【Git】push代码时候报错,出现fatal: unable to access xxx Recv failure: Connection was reset
【Git】push代码时候报错,出现fatal: unable to access xxx Recv failure: Connection was reset
140 0
【SVN】is not known to exist in the repository and is not part of the commit, yet its child
【SVN】is not known to exist in the repository and is not part of the commit, yet its child
752 0
【SVN】is not known to exist in the repository and is not part of the commit, yet its child
|
Android开发
【错误记录】Tinker 热修复示例运行报错 ( patch receive fail: /storage/emulated/0/patch_signed_7zip.apk, code: -2)
【错误记录】Tinker 热修复示例运行报错 ( patch receive fail: /storage/emulated/0/patch_signed_7zip.apk, code: -2)
415 0
【错误记录】Tinker 热修复示例运行报错 ( patch receive fail: /storage/emulated/0/patch_signed_7zip.apk, code: -2)
|
开发工具 git
Commit request failed Commit failed. Ref must be HEAD and is HEAD
Commit request failed Commit failed. Ref must be HEAD and is HEAD
Commit request failed Commit failed. Ref must be HEAD and is HEAD
SET UPDATE TASK LOCAL and commit session issue
SET UPDATE TASK LOCAL and commit session issue
125 0
SET UPDATE TASK LOCAL and commit session issue
my Note debug - add to function
Created by Wang, Jerry, last modified on Feb 03, 2015
my Note debug - add to function
Unable to add window --token is not valid
Unable to add window --token is not valid
|
安全
Error Code: 1175. You are using safe update mode and you tried to update a t
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/inforstack/article/details/79677217 在安全模式下,只能根据主键来做修改,所以使用非主键修改,那么将要解除安全模式,然后再执行操作。
1618 0