解决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"

目录
相关文章
|
6月前
|
应用服务中间件 Python 容器
ERROR [ntContainer#0-1] o.s.a.r.l.SimpleMessageListenerContainer 1917: Failed to check/redeclare aut
ERROR [ntContainer#0-1] o.s.a.r.l.SimpleMessageListenerContainer 1917: Failed to check/redeclare aut
236 0
|
开发工具 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
216 0
|
Shell 开发工具 git
Git使用commit命令时报错“bad numeric config value ‘ture‘ for ‘color.ui‘: invalid unit”(已解决)
Git使用commit命令时报错“bad numeric config value ‘ture‘ for ‘color.ui‘: invalid unit”(已解决)
257 0
Git使用commit命令时报错“bad numeric config value ‘ture‘ for ‘color.ui‘: invalid unit”(已解决)
|
开发工具 git Windows
Git 遇到了 early EOF index-pack failed 问题
Git 遇到了 early EOF index-pack failed 问题  今天想 clone 一下 boost 在 github 的 repo,结果在 clone 的过程中遇到了下面的错误。
6282 0
|
Android开发
【转】svn:is not under version control and is not part of the commit, yet its child解决办法
来自:http://blog.csdn.net/lufeng20/article/details/7641093    在把写好的代码提交到svn上面时,遇到了一个错误如下: svn: Commit failed (details follow): svn: 'D:\eclipse\Statu...
1379 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
905 0
【SVN】is not known to exist in the repository and is not part of the commit, yet its child
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 在安全模式下,只能根据主键来做修改,所以使用非主键修改,那么将要解除安全模式,然后再执行操作。
1644 0