Skip to content

Instantly share code, notes, and snippets.

@thomelane
Created June 28, 2020 22:50
Show Gist options
  • Save thomelane/06c70591e34da1b37aaa4a64da29f5c8 to your computer and use it in GitHub Desktop.
Save thomelane/06c70591e34da1b37aaa4a64da29f5c8 to your computer and use it in GitHub Desktop.
Remove git-secrets from a local project
# run from inside the project folder
find . -regex '.*/\.git/hooks/commit-msg' -exec sed -i '' -e 's/git secrets --commit_msg_hook -- "$@"//' {} \;
find . -regex '.*/\.git/hooks/pre-commit' -exec sed -i '' -e 's/git secrets --pre_commit_hook -- "$@"//' {} \;
find . -regex '.*/\.git/hooks/prepare-commit-msg' -exec sed -i '' -e 's/git secrets --prepare_commit_msg_hook -- "$@"//' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment