#!/bin/sh
#
# Run JSHint validation before commit.
files=$(git diff --cached --name-only --diff-filter=ACMR -- *.js)
pass=true
if [ "$files" != "" ]; then
for file in ${files}; do
result=$(jshint ${file})
if [ "$result" != "" ]; then
echo $result
pass=false
fi
done
fi
if $pass; then
exit 0
else
echo ""
echo "COMMIT FAILED:"
echo "Some JavaScript files are invalid. Please fix errors and try committing again."
exit 1
fi
相关推荐
使用方式: 1、解压package.rar package.rar 2、进入package文件夹,右键打开git bash 3、执行 sh install.sh 进行...4、执行git init 命令,查看当前目录是否生成 .git/gitcommit 和 .git/hooks/commit-msg 验证
idea commit 模板插件
personal used template for git commit. including category/bug id...
04★Git入门★第一次提交_git_commit
git rebase -i HEAD~n,n条commit进行rebase 将需要修改的commit信息,将pick命令改为 r 命令;ESC 输入 :wq 回车 开始修改commit信息,修改完,ESC 输入 :wq 回车 打印出成功 git log oneline -n,查看n条log信息,...
一篇非常不错的关于提交GIT message的英文文章
Git Commit 规范格式于说明 git commit 的类别,只允许使下的标识feat: 新功能(feature)bug: 发现 bug,但没有修复doc
使用CLI prompt轻松编辑 git commit
欢迎来到git-commit-msg-linter :waving_hand: :eyes: 立即查看您的每条git commit消息 :rocket: 。 一个git“ commit-msg”挂钩,用于根据流行的来替换您的git commit消息。 作为一个挂钩,它将在每次提交时运行...
主要介绍了详解git commit --amend 用法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
最后提交日志 Node.js模块可获取最新的git commit信息-主要由CI / CD和构建阶段使用。谁在用 :star: :star: :star: :star: :star: :star: :star: :star: :star:用法 const LCL = require ( 'last-commit-log' ) ;...
从 git commit 消息管理更改日志 命令 有2个可执行命令: bin/控制台 gitlog:branch [path_to_repo] 显示 repo 的分支。 bin/控制台 gitlog:commit [path_to_repo] 显示或导出日志。 该命令支持以下参数: --...
:slot_machine: git-committerA node.js script to generate a git commit commit record.一个用来生成 git commit 提交记录的 node.js 脚本用来填满 github 绿色小方块(或者其他用途).BeforeAfter :sparkles: :...
git-commit-id-plugin is a plugin quite similar to https://fisheye.codehaus.org/browse/mojo/tags/buildnumber-maven-plugin-1.0-beta-4 for example but as buildnumber at the time when I started this ...
不git commit当你drunk时
git-precommit-branch-name 自动将您的分支名称放入git commit消息中。 如果要在每个提交消息中添加分支名称,那么此工具正是您所需要的。 你为什么需要这个? 通常,当我们使用git时,我们将分支的名称与任务/工单...
在日常的开发中,目前主流的代码管理工具就是 git 了,当我们对代码进行改动了,首先得git commit提交到本地仓库,git 规定了提交时必须填写提交信息作为改动说明,保存 commit 历史中,可以找到历史代码,也方便他人 ...
git-commit-message-helper 本插件是源idea插件的升级版,增加了一系列个性化配置。 安装 直接从 IDE 插件管理器安装(文件 > 设置 > 插件 > 浏览器存储库 > Git Commit Message Helper) 用法 如果要更改提交类型,...
git commit格式
git commit --amend 2 例子 git commit 输入以下数据: feat: test commitlint test commitlint test commitlint of the project 根据commitlint规范的提示,得到如下的数据提示,但是我又强迫症 husky > commit...