Skip to content

Instantly share code, notes, and snippets.

@pcofilada
pcofilada / pre-commit
Last active March 11, 2021 11:37
Pre commit hooks fo rails development
#!/bin/sh
HOOKS="pre-commit-eslint pre-commit-rspec pre-commit-rubocop pre-commit-prevent-master"
for hook in $HOOKS; do
if [ -f "$PWD/.git/hooks/$hook" ]; then
"$PWD/.git/hooks/$hook"
if [ $? != 0 ]; then
exit 1
fi