git hooks防止把个人密码信息上传到github
Introduction
In most projects, hooks are in .git/hooks
. The hooks are some scripts written in Ruby or Python or Shell or whatever language you are familiar with. If you want to use the bundled hook scripts, you’ll have to rename them without file extentions .sample
There are two kind of hooks, client-side hooks and server-side hooks.
Here, I just focus on pre-commit
on client-side.