相关疑难解决方法(0)

如何仅对分阶段内容运行git预提交检查?

假设git status给出了这个:

# On branch X
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   modified:   file1.cc
#   modified:   file1.h
#   modified:   file1_test.cc
#   modified:   SConscript
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#   (commit or discard the untracked or modified content in submodules)
#
#   modified:   file1.cc
# …
Run Code Online (Sandbox Code Playgroud)

git pre-commit pre-commit-hook

15
推荐指数
2
解决办法
3687
查看次数

标签 统计

git ×1

pre-commit ×1

pre-commit-hook ×1