ES · Leer en español Explore for free

Free · open source · MIT · Hooks

Git hooks and pre-commit

Bash git hooks with no dependencies that validate your commits and stop secrets before they reach GitHub.

Cover of Git hooks and pre-commit

The problem

One slip is enough to push an AWS key, a .env file or a huge file to GitHub. Deleting it afterwards doesn't help: it stays in the history and you have to rotate the key. These git hooks, written in bash with no dependencies, check every commit before it leaves your machine: they block AWS, GitHub, Stripe and Slack keys, .env files, private keys and large files, and validate the message with Conventional Commits.

What’s included

  • commit-msg: validates Conventional Commits
  • pre-commit: blocks AWS, GitHub, Stripe and Slack keys, .env, private keys and large files
  • instalar-hooks.sh: enables them with one command

Install it in one minute

git clone https://github.com/carlosp5751258-lgtm/git-hooks-espanol.git
cp -r git-hooks-espanol/.githooks .
bash git-hooks-espanol/instalar-hooks.sh
git-hooks-espanolCode, README and MIT license on GitHub

License: MIT · use, modify and share it, including in commercial projects.