Skip to content

Instantly share code, notes, and snippets.

@geraldyeo
Created April 28, 2017 02:25
Show Gist options
  • Save geraldyeo/d9a9fda43c3066fb49507f850dfd82dd to your computer and use it in GitHub Desktop.
Save geraldyeo/d9a9fda43c3066fb49507f850dfd82dd to your computer and use it in GitHub Desktop.
disable git hooks temporarily
gitdir="$(git rev-parse --git-dir)"
hook="$gitdir/hooks/post-commit"
# disable post-commit hook temporarily
[ -x $hook ] && chmod -x $hook
git commit -a -m "Commit all changes for testing. Will be reverted automatically"
# enable it again
chmod +x $hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment