Created
April 28, 2017 02:25
-
-
Save geraldyeo/d9a9fda43c3066fb49507f850dfd82dd to your computer and use it in GitHub Desktop.
disable git hooks temporarily
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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