Files
freeCodeCamp/guide/chinese/git/git-hooks/index.md
2018-10-16 21:32:40 +05:30

17 lines
624 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Git Hooks
localeTitle: Git Hooks
---
## Git Hooks
Git Hooks是位于git存储库的`.git/hooks/`目录中的脚本。这些脚本在版本控制过程中的不同阶段触发后运行。
### 样品
在这个目录中有一些示例脚本,例如`pre-commit.sample` 。每次用户运行`git commit`此特定示例都会运行。如果钩子脚本以0以外的状态退出则提交将停止。
### 文档
* [Git Hooks的文档](https://git-scm.com/docs/githooks)
* [关于Git Hooks的Atlassian教程](https://www.atlassian.com/git/tutorials/git-hooks)
* [Git Hooks指南](http://githooks.com/)