Skip to content

Commit

Permalink
[ADD] Script to recursively remove git hooks from a repository.
Browse files Browse the repository at this point in the history
  • Loading branch information
janstrohbeck committed Mar 28, 2019
1 parent 57dca11 commit 672ff12
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions remove_hooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: remove_hooks.sh /path/to/repository" >&2
exit 1
fi
cd $1 || exit 2
find . -name ".git" -type d | xargs -n1 -I _DIR_ find _DIR_ -name "*.config.yaml" -exec rm {} \;
find . -name ".git" -type d | xargs -n1 -I _DIR_ find _DIR_ -name "pre-commit" -exec rm {} \;
find . -name "run_hooks" -exec rm {} \;

0 comments on commit 672ff12

Please sign in to comment.