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

目录
相关文章
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
773 0
|
4月前
|
Docker 容器
ADD failed: file not found in build context or excluded by .dockerignore: stat irap_rule_center: fil
ADD failed: file not found in build context or excluded by .dockerignore: stat irap_rule_center: fil
|
缓存
【已解决】npm start 报错 Could not freeze ...: cannot read properties of undefined (reading ‘hash‘)
npm start 报错 Could not freeze ...: cannot read properties of undefined (reading ‘hash‘)
585 0
|
开发工具 git Windows
Git 遇到了 early EOF index-pack failed 问题
Git 遇到了 early EOF index-pack failed 问题  今天想 clone 一下 boost 在 github 的 repo,结果在 clone 的过程中遇到了下面的错误。
6314 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...
1402 0
Unable to add window --token is not valid
Unable to add window --token is not valid
|
数据安全/隐私保护
SmartSVN无法提交的解决办法:because it was moved from which is not part of the commit; both sides of the move
SmartSVN无法提交的解决办法:because it was moved from which is not part of the commit; both sides of the move
419 0
|
安全
Error Code: 1175. You are using safe update mode and you tried to update a t
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/inforstack/article/details/79677217 在安全模式下,只能根据主键来做修改,所以使用非主键修改,那么将要解除安全模式,然后再执行操作。
1661 0

热门文章

最新文章